Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for Show only | Search instead for Did you mean:Copy link to clipboard
Is there any tool which we can use with Coldfusion to generate the PDF's from HTML/webpage?
I have seen many tool kit, when we want to convert a PDF from the webpage, we need to click "find" on the browser and select the tool , where the PDF will be created.
Instead can we use some API of that and implement the same functionality ?
All I need is a link or button in my webpage, when the user clicks on that, the PDF should be generated with the current page as the content.
I hope my question is understood.
Your help in highly appreciated.
Thanks in advance!
Community guidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
13 Replies 13 /t5/coldfusion-discussions/html-to-pdf-converter/m-p/3888105#M141216 Jan 17, 2012 Jan 17, 2012Copy link to clipboard
Community guidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Contributor , /t5/coldfusion-discussions/html-to-pdf-converter/m-p/3888106#M141217 Jan 17, 2012 Jan 17, 2012Copy link to clipboard
I was expecting your reply.:)
With the CFDOCUMENT I need to write a code to generate a PDF.
I have nearly 60 different reports, all are different with the fonts, images etc. So If I use CFDOCUMENT, I need to write 60 different files.Am I right ??
Instead I thought I can purchase some kit with the help of that, I can generate the PDF with the current page(HTML).
Community guidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
/t5/coldfusion-discussions/html-to-pdf-converter/m-p/3888107#M141218 Jan 17, 2012 Jan 17, 2012Copy link to clipboard
CFDocument just takes HTML input, so however you get that is up to you. If you already have a method for creating the report in HTML just do so, use CFSaveContent to grab the HTML you were about to output to the screen and wrap it in a CFDocument. It won't be perfect, but it should do.
Community guidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Contributor , /t5/coldfusion-discussions/html-to-pdf-converter/m-p/3888108#M141219 Jan 17, 2012 Jan 17, 2012Copy link to clipboard
Yes, you are right, but as you said, it wont be perfect. My client is very particular on the perfection.
Community guidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
/t5/coldfusion-discussions/html-to-pdf-converter/m-p/3888109#M141220 Jan 17, 2012 Jan 17, 2012Copy link to clipboard
In which case you'll probably need to create 60 different reports, and they'll need to pay you for your time. If the reports have similarities I'm sure you can automate them somehow, certainly once you've created a working framework and CSS document the other 59 will be far quicker
1 1 Upvote Community guidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Contributor , /t5/coldfusion-discussions/html-to-pdf-converter/m-p/3888110#M141221 Jan 17, 2012 Jan 17, 2012Copy link to clipboard
There you are.. I do not have enough time, and its me who suggested that I will look for third party tools to make this task faster.
But I'm unable to get one which I wanted to do .:(
Creating 60 different files is the last option for me.
Community guidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
/t5/coldfusion-discussions/html-to-pdf-converter/m-p/3888111#M141222 Jan 17, 2012 Jan 17, 2012Copy link to clipboard
I'd recommend DocRaptor. Its API is easy to integrate with your own web applications, and as long as you can make an HTTP POST request against its server, you can generate PDFs from HTML code.
Community guidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Expert , /t5/coldfusion-discussions/html-to-pdf-converter/m-p/3888112#M141223 Jan 18, 2012 Jan 18, 2012Copy link to clipboard
illbzo1 wrote: I'd recommend DocRaptor. Its API is easy to integrate with your own web applications, and as long as you can make an HTTP POST request against its server, you can generate PDFs from HTML code. |
True, DocRaptor is one of the better HTML-to-PDF converters out there. Remember, however, that it costs money and is a web service. If Meensi's client is very particular about perfection, then he will likely be very particular about Meensi posting his documents to the web.
Still, DocRaptor remains a good suggestion. What Meensi could do is install DocRaptor's engine, Prince. He could then run Prince from ColdFusion by means of cfexecute.