Saad A
Saad A

Reputation: 1147

Coldfusion: CFDocument PDF Alternatives

I have been using Coldfusion cfdocument to generate PDF. However, ever since my trail period expired, I have this ugly watermark saying "Adobe ColdFusion Developer Trail Edition/Not for Production Use" showing on my PDF files.

I did some research and found that you have to buy a license for this feature to work. Is there a way around it? Are any alternatives available that are free for use?

Upvotes: 2

Views: 970

Answers (1)

James Moberg
James Moberg

Reputation: 4475

I use and recommend WKHTMLTOPDF. It's a single, portable command line program. (There's also WKHTMLTOImage.)

http://wkhtmltopdf.org/

I wrote a custom tag that works with ColdFusion 9, 10, 11 & 2016 and generates consistent high-quality results on each version:

http://gamesover2600.tumblr.com/search/wkhtmltopdf

<CF_WKHTMLTOPDF
  PageURL = "http://#CGI.Server_Name#/temp/#PDFFileName#_Page.htm"
  HeaderURL = "http://#CGI.Server_Name#/temp/#PDFFileName#_Header.htm"
  FooterURL = "http://#CGI.Server_Name#/temp/#PDFFileName#_Footer.htm"
  filename = "c:\websiteroot\temp\#PDFFileName#.pdf"
  orientation = "portrait"
  DisableSmartShrinking="yes"
  margintop = "1"
  marginleft = "0.25"
  marginright = "0.25"
  marginbottom = "0.50">

Upvotes: 7

Related Questions