• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

creating a word document using coldfusion

New Here ,
Oct 23, 2024 Oct 23, 2024

Copy link to clipboard

Copied

Hello

 

I havent been using ColdFusion for years. Not a novice but after more than 10 years it would be true to say probably very rusty and not up to date on CF best practices.

 

I havea requirement to create a document (well parts of the document using ColdFusion).

 

I essentially want to creat a document that has a fair amout of text in it (i want to create a contract between half a dozen people - I will get the names of the people using a query and the results of the query will then be available to include in various places in the document.

 

Thanks in advance for any tips on the best way to do this.

 

 

Views

127

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 23, 2024 Oct 23, 2024

Copy link to clipboard

Copied

I would suggest you create not a Word document, but an HTML document instead. Create it within a CFM page, of course, perhaps using an HTML form or table. Use CSS to style the HTML to your needs.

 

I am assuming that you wish to generate a separate contract for each user. You could, for each user, use a query to fetch the details of the user from the database and populate the fields in the HTML. You could then generate a PDF from the HTML using cfdocument or cfhtmltopdf.

 

In an application I worked on years ago, the signature of each user had been recorded beforehand and stored in the database as a small image. The image had the same dimensions for each and every user.  The image would be obtained from the database, and the <img> tag was used to place it on the precise signature-location in an HTML document.

 

Nowadays it is customary to digitally documents (even after they've been manually signed). You can use cfpdf to digitally sign PDFs.

 

  

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 26, 2024 Oct 26, 2024

Copy link to clipboard

Copied

LATEST

Hi, if you want is it possible to use Java Apache POI but the best way is to choose PDF alternative.

Here a sample guide in Java https://www.baeldung.com/java-microsoft-word-with-apache-poi

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation