Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

<cfhtmltopdf> problem

Explorer ,
May 26, 2016 May 26, 2016

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.

2.5K
Translate
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 2 Correct answers

Enthusiast , 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

Translate
Community Beginner , Jan 05, 2022 Jan 05, 2022

https://community.adobe.com/t5/coldfusion-discussions/installing-coldfusion-add-on-services-pdfg-for-linux-success/td-p/12103936

 

You can cross-reference this post.  I actually abandoned pdfg for linux because it was buggy even after finally getting it working.  I am using wkhtmltopdf instead.

Translate
Enthusiast ,
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

Translate
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

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.

Translate
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

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!

Translate
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

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.

Translate
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 Expert ,
Jan 04, 2022 Jan 04, 2022

@karih38190410 ,

Could you pease share your solution with the forum. This seems to be a recurrent problem. So your solution will help many.

Translate
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 ,
Jan 05, 2022 Jan 05, 2022

https://community.adobe.com/t5/coldfusion-discussions/installing-coldfusion-add-on-services-pdfg-for...

 

You can cross-reference this post.  I actually abandoned pdfg for linux because it was buggy even after finally getting it working.  I am using wkhtmltopdf instead.

Translate
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 Expert ,
Jan 06, 2022 Jan 06, 2022
LATEST

Ah. Thanks again, @karih38190410 . 

Translate
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
Resources