我一直在使用 Coldfusion cfdocument 生成 PDF。然而,自从我的试用期到期后,我的 PDF 文件上就出现了这个难看的水印,上面写着“Adobe ColdFusion Developer Trail Edition/Not for Production Use”。
我做了一些研究,发现您必须购买许可证才能使用此功能。有办法解决吗?是否有任何可供免费使用的替代品?
最佳答案
我使用并推荐 WKHTMLTOPDF。它是一个单一的、可移植的命令行程序。 (还有 WKHTMLTOImage。)
我编写了一个自定义标签,适用于 ColdFusion 9、10、11 和 2016,并在每个版本上生成一致的高质量结果:
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">
关于pdf - Coldfusion:CFDocument PDF 替代品,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36967017/