Copy link to clipboard
Copied
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?
*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
...Copy link to clipboard
Copied
I forgot to mention I am using CF 9
Copy link to clipboard
Copied
*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.
Copy link to clipboard
Copied
Yes. cfdocument has a src attribute. Just point it to a URL.