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

Convert HTML to a PDF

Guest
Nov 03, 2010 Nov 03, 2010

Can ColdFusion take a snap shot of an HTML page and convert it to a PDF? I want to automate a process where a user goes to an HTML page, updates data from a word document,and then converts the word doc to a PDF and stores it. Can ColdFusion eliminate the user? Can I just set up a process in the administrator to run a script once a month that can do this?

*convert HTMl page to PDF

*Then put the file into the archive folder

I am trying to convince the owners to simply make this a form that inserts into a DB, but old habbits are hard to break. Until that time, can the above be done?

1.2K
Translate
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

correct answers 1 Correct answer

Valorous Hero , Nov 03, 2010 Nov 03, 2010

*convert HTMl page to PDF

Yes, using CFDOCUMENT. Though this entry is about thumbnails, it does show how you can use cfdocument to capture the html of a url and convert it to pdf

http://www.coldfusionjedi.com/index.cfm/2007/6/13/ColdFusion-8-URL-Thumbnails

Just be aware CFDOCUMENT is not perfect. It does not always handle complex CSS styles. But for basic html it should do the job.

*Then put the file into the archive folder

Use the "filename" atribute to save the file anywhere you want. Check the doc

...
Translate
Guest
Nov 03, 2010 Nov 03, 2010

I forgot to mention I am using CF 9


Translate
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
Valorous Hero ,
Nov 03, 2010 Nov 03, 2010

*convert HTMl page to PDF

Yes, using CFDOCUMENT. Though this entry is about thumbnails, it does show how you can use cfdocument to capture the html of a url and convert it to pdf

http://www.coldfusionjedi.com/index.cfm/2007/6/13/ColdFusion-8-URL-Thumbnails

Just be aware CFDOCUMENT is not perfect. It does not always handle complex CSS styles. But for basic html it should do the job.

*Then put the file into the archive folder

Use the "filename" atribute to save the file anywhere you want. Check the documentation for more details.

Translate
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
Engaged ,
Nov 03, 2010 Nov 03, 2010
LATEST

Yes. cfdocument has a src attribute. Just point it to a URL.

Translate
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