Skip to main content
Inspiring
June 25, 2025
Answered

Issue with IsPDFObject() after upgrading ColdFusion 2023 from Update 10 to Update 12

  • June 25, 2025
  • 1 reply
  • 467 views

Hi Experts,

We recently upgraded our ColdFusion 2023 environment from Update 10 to Update 12. After the upgrade, we encountered an issue in one of our applications that handles PDF uploads and validation.

Previously, we used the IsPDFObject(mytempPDFObj) function to validate uploaded PDF files, and it worked as expected. However, after the upgrade, this function consistently returns NO, even though the uploaded files are valid PDFs and were working fine before the update.

We confirmed that:

  • The uploaded files have the correct .pdf extension.
  • The same files were successfully validated before the upgrade.
  • mytempPDFObj is being populated correctly but appears to be a struct always, not a PDF object.

Has anyone else experienced this issue after Update 12? Is there a change in how ColdFusion handles PDF objects or MIME validation in this update?

Any insights or workarounds would be greatly appreciated.

 

Thanks in advance!

 

Correct answer kkmr2011

KK, as for your saying "filelocation is the uoloaded path which is expected", is this as of update 12? And you feel it's the correct value?

 

Then as for saying "myPDFObj is Data in struct" and "it's as expected always", are you saying you've dumped it? And have you compared the dumps on the two different updates? That seems worth doing.

 

Your current suspicion is that the function behavior has changed between updates. I'm just wanting to help you make sure THE INPUT to it is the same. 🙂

 

Finally, had you stopped cf (since going to update 12) and deleted the cfusion/bin/felix-cache folder? Sometimes the update makes changes that call for this. And though not every cf update technote, if you skip an update you have to consider steps in the technotes of the updates skipped. 


Hi All, Thanks for all your suggestions, this issue has been resolved. Came to know that when updrage is happend server did not picked the document library versions, after refresh the caching, issue got resolved.

 

I belive the /bin/felix-cache  also invloved in this cache refresh.

1 reply

Participating Frequently
June 25, 2025

Hello,
Can you provide code for generating this mytempPDFObj?
IsPDFObject will return bool value depending on value you provide as argument. 
Are you using <cfpdf> to generate the file or you are reading the file from path like FileRead() or <cffile> to get or generate pdf?
We had something similiar in our case when we went from CF11 to CF23 and the easiest way for us to check this was https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-in-k/ispdffile.html
Hope this helps!
Regards

kkmr2011Author
Inspiring
June 25, 2025
After upload below is the check
<cfset isValidFilePath = IsPDFFile("#filelocation#")>
and then reading a file with help
        <cfpdf source="#filelocation#" action="read" name="myPDFObj"/>
        <cfset isValidPdfObj = IsPDFObject(myPDFObj)>

 isValidPdfObj is NO always
Charlie Arehart
Community Expert
June 25, 2025

Please try first to output both the value of that filelocation variable,  and then mypdfobj,  to make sure both have what you'd expect. Since ispdffile expects a string argument (a path), you should see one, via cfoutput. Since ispdfobject expects and object, do a cfdump of that.

 

And do you know what the value of the filelocation returned before the update? 

/Charlie (troubleshooter, carehart. org)