0

Without warning and with no code change on my end the hosting company applied Update 19 to ColdFusion 11. They claim it's unrelated yet no PDF document can be populated from the DB.

Here's the beginning of the code that worked perfect for years.

<cfpdfform source="#ExpandPath( 'FORMS/PDF_FORM_TEMPATE.pdf' )#" action="populate" destination="#expandPath('TEMP/I9_#accountinfo.company_id#_#EMPLOYEE_ID#_#hog_data.LAST_NAME#.pdf')#" overwrite=true >
      <cfpdfsubform name="i9Main">
        <cfpdfformparam name="LAST_NAME" value="#hog_data.LAST_NAME#">

Then I end the code by writing it to the final destinations and output it to the screen for viewing.

 <cfpdf action="write" destination="#expandPath('FINAL/I9_#accountinfo.company_id#_#EMPLOYEE_ID#_#hog_data.LAST_NAME#.pdf')#" source="#expandPath('TEMP/I9_#accountinfo.company_id#_#EMPLOYEE_ID#_#hog_data.LAST_NAME#.pdf')#" flatten="yes" overwrite="yes">
  <cffile action="delete" file="#expandPath('TEMP/I9_#accountinfo.company_id#_#EMPLOYEE_ID#_#hog_data.LAST_NAME#.pdf')#">
  <cflocation url="final/I9_#accountinfo.company_id#_#EMPLOYEE_ID#_#hog_data.LAST_NAME#.pdf">

This code has worked great until 6 Mar when the web hosting company applied ColdFusion Update 19. Has anyone has an issue with this or have suggestions?

  • 2
    Quit working how? An error or the forms are blank? Did you check the bug tracker? – SOS Mar 17 '21 at 13:00
  • 1
    Find out if they also updated the JDK. I've had an issue recently with an older version of CF where `cfpdf` worked just fine on point version of a JDK, but updating that to a newer point version blew up. – Adrian J. Moreno Mar 17 '21 at 14:41
  • Copy all and thanks for the advice. Right now, the hosting company has the CF debugging turned off so, I have no idea what the error is. I did notice that the PDF file is created in the temp folder like show in the code above, yet when you attempt to open it, it states that the file has been damaged which is a default PDF error message. – Edward Burtle Mar 18 '21 at 09:17
  • Can you give me a little more information on the JDK issue. Was a fix identified that could potentially help? – Edward Burtle Mar 18 '21 at 09:18
  • If there are errors, you can view them by wrapping the code in a cftry/cfcatch and cfdump'ing the #cfcatch# error on screen. You could also try opening the generated PDF with say notepad, and see if the contents look like binary or an error. – SOS Mar 18 '21 at 17:33
  • I'll try to the cfcatch suggestion to if I can post the errors to a database for easy review. Great idea. – Edward Burtle Mar 22 '21 at 10:23

1 Answers1

0

First off, I want to thank all of you who provided suggestion. Turns out Adrian J. Moreno was correct. This issue was caused by an incompatible version of the Java Run Time Environment. Updating this fixed the issue and populating PDFs is now working again site-wide.

  • In case someone else has the same issue, what was the incompatible JRE version and what version did they update to? – SOS Mar 24 '21 at 01:31