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

cfhtmltopdf connection refused?

Explorer ,
Jan 31, 2024 Jan 31, 2024

Copy link to clipboard

Copied

We migrated our Coldfusion 2023 Windows Server to a new server over the weekend, and "cfhtmltopdf" has stopped working.  It can generate a PDF fine and display it, but when actually trying to save it to the server, we get this:

<cfhtmltopdf
destination="c:\filename.pdf"
  source="http://#CGI.Server_Name#/filename.html" overwrite="true">
</cfhtmltopdf>
 
Jan 31, 2024 13:16:12 PM Error [ajp-nio-127.0.0.1-8022-exec-24] - Connect to 127.0.0.1:8995 [/127.0.0.1] failed: Connection refused: connect http://127.0.0.1:8995/PDFgServlet/
Jan 31, 2024 13:16:12 PM Error [ajp-nio-127.0.0.1-8022-exec-24] - Error occurred while generating PDF.
 
Not sure if this helps, but http://127.0.0.1:8995/PDFgServlet/ brings up:
 
HTTP ERROR 400 Bad Request
URI: /PDFgServlet/
STATUS: 400
MESSAGE: Bad Request
SERVLET: PDFgServlet
Powered by Jetty:// 9.4.51.v20230217
 
The service for Coldfusion2023add-onservice is running, and port 8995 is open.  
 
Any ideas/suggestions?

Views

2.9K

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 Expert ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

LATEST

The HTTP 400 error suggests that ColdFusion can actually connect with the PDF service. This is confirmed because ColdFusion can generate and display PDFs.

 

You are perhaps getting the error because cfhtmltopdf is unable to read a file or to overwrite an existing PDF. The source file may not exist .  Is the source paerhaps http://#CGI.Server_Name#:#CGI.Server_Port#/filename.html ? The destination PDF file may be open or be locked by another process. Check that.

Votes

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