<cfhtmltopdf> problem

Explorer ,
May 26, 2016 May 26, 2016

Copy link to clipboard

Copied

I'm trying to get <cfthmltopdf> to work and am having problems.  We're running Coldfusion 11, on Red Hat 7.2.  We've done a fresh installation of CF and are sure that PDFG is installed.

Following these steps ColdFusion Help | PDF Generation in ColdFusion , all additional packages are installed on the server except ias32-libs, which my sysadmin tells me does not exist.  Fonts have been extracted in the /usr/share/fonts directory.  I am able to select the 'Verify All Service Managers' button in the CF administrator on the PDF Service page.  The Connection Status returns as OK.

I'm trying to run a simple test and am getting an error.

<cfhtmltopdf>

This is today: #now()#

</cfhtmltopdf>

Error occurred while generating PDF.

coldfusion.document.webkit.PDFgErrorHandler$ServiceManagerConversionException: Error occurred while generating PDF.

at coldfusion.tagext.lang.HtmlToPdfTag.handleRetryError(HtmlToPdfTag.java:1509)

at coldfusion.tagext.lang.HtmlToPdfTag.handlePDFgConversionRequest(HtmlToPdfTag.java:1471)

at coldfusion.tagext.lang.HtmlToPdfTag.convertToPDF(HtmlToPdfTag.java:1413)

at coldfusion.tagext.lang.HtmlToPdfTag.doEndTag(HtmlToPdfTag.java:1551)

at cfcomma2ecfm1427821176.runPage(/local/web/app-dev/playpen/aimee/comma.cfm:1)

at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:246)

at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:734)

at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:570)

at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)

at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)

at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:487)

at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42)

at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

at coldfusion.filter.PathFilter.invoke(PathFilter.java:141)

at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)

at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)

at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)

at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)

at coldfusion.CfmServlet.service(CfmServlet.java:219)

at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)

at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:121)

at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)

at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:198)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)

at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:745)

Entries in the coldfusion-out.log file are:

May 26, 2016 15:46:46 PM Error [ajp-bio-8014-exec-10] - PDF conversion failed due to task time out in waiting queue for http://127.0.0.1:8987/PDFgServlet/.

May 26, 2016 15:47:46 PM Error [ajp-bio-8014-exec-10] - PDF conversion failed due to task time out in waiting queue for http://127.0.0.1:8987/PDFgServlet/.

May 26, 2016 15:47:46 PM Error [ajp-bio-8014-exec-10] - Error occurred while generating PDF.Reason: Error occurred while handling request. The specific sequence of files included or processed is: /local/web/app-dev/playpen/aimee/comma.cfm, line: 1

Any assistance would be greatly appreciated.

Views

1.2K

Likes

Translate

Translate

Report

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

Engaged , May 27, 2016 May 27, 2016
Have you considered generating PDFs using a non-Adobe product?  I've had huge success using WKHTMLTOPDF (free) with ColdFusion 8, 9, 10, 11 & 2016. (I've found it to be faster and generate smaller PDFs.)   According to the WKHTMLTOPDF website, it works with Window XP/2003/Vista/Server, Linux (Debian, Ubuntu & CentOS) and OS X.http://wkhtmltopdf.org/Here are some posts I've written regarding my experience (including a Custom Tag):http://gamesover2600.tumblr.com/search/wkhtmltopdf

Likes

Translate

Translate
Engaged ,
May 27, 2016 May 27, 2016

Copy link to clipboard

Copied

Have you considered generating PDFs using a non-Adobe product?  I've had huge success using WKHTMLTOPDF (free) with ColdFusion 8, 9, 10, 11 & 2016. (I've found it to be faster and generate smaller PDFs.)   According to the WKHTMLTOPDF website, it works with Window XP/2003/Vista/Server, Linux (Debian, Ubuntu & CentOS) and OS X.

http://wkhtmltopdf.org/

Here are some posts I've written regarding my experience (including a Custom Tag):

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

Likes

Translate

Translate

Report

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 ,
May 27, 2016 May 27, 2016

Copy link to clipboard

Copied

CFHTML2PDF works only on Windows so with your RedHat install, I hope you haven't been trying too long?  It also only works with the Enterprise version of CF to my knowledge.

I agree with Jamo regarding WKHTMLTOPDF.  It's great.  It has a companion, WKHTMLTOIMAGE that I use quite often with great results.

Likes

Translate

Translate

Report

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
Explorer ,
May 27, 2016 May 27, 2016

Copy link to clipboard

Copied

Per the documentation ColdFusion Help | PDF Generation in ColdFusion, Linux support was added to CF but has additional requirements. 

We've installed WKHTMLTOPDF and initial testing looks very promising.  Many thanks to both of you!

Likes

Translate

Translate

Report

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
Community Beginner ,
Jun 09, 2021 Jun 09, 2021

Copy link to clipboard

Copied

LATEST

I don't know if you still care, but after trying over many years I got this working on red hat and have documented how.

Likes

Translate

Translate

Report

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