Copy link to clipboard
Copied
Hi -
I installed CF10 Enterprise on a Windows 2008 R2 Enterprise 64-bit system.
I updated with the mandatory cf10_mdt_updt.jar update
I applied Update 21 hotfix_021.jar
After installation, I used the Web Configuration Tool to remove 'All IIS Sites', and allowed the server to be restarted to complete the removal.
Then I re-added 'All IIS Sites'. This was to ensure that the wsconfig/1/isapi_redirect.dll was updated to the 8/19/2016 version.
After this, almost everything works correctly, except for PDFs. The server returns the correct number of pages, but all are blank, when I try to display this way (angle brackets removed):
cfcontent type="application/pdf" reset="yes"
cfoutput#toString(request.printable.viewOutput)#/cfoutput
I have other code which can display PDFs, so it is not iText doing this. It might be CF cutting off binary content, which was a problem earlier in the CF10 saga, but I thought this was fixed, right? Update 21 tech notes page says that Update 21 includes all prior fixes too.
So, has anyone else seen this problem, and found a solution?
Thanks,
Ian
I don't know if this will have any impact on what you are experiencing, but if you are using CFCONTENT, you don't need CFOUTPUT around your variable.
<cfcontent type="application/pdf" reset="yes" variable="<cfoutput>#toString(request.printable.viewOutput)#</cfoutput>" />
should be
<cfcontent type="application/pdf" reset="yes" variable="#toString(request.printable.viewOutput)#" />
The CFOUTPUT is implied.
HTH,
^_^
Copy link to clipboard
Copied
I don't know if this will have any impact on what you are experiencing, but if you are using CFCONTENT, you don't need CFOUTPUT around your variable.
<cfcontent type="application/pdf" reset="yes" variable="<cfoutput>#toString(request.printable.viewOutput)#</cfoutput>" />
should be
<cfcontent type="application/pdf" reset="yes" variable="#toString(request.printable.viewOutput)#" />
The CFOUTPUT is implied.
HTH,
^_^
Copy link to clipboard
Copied
Thanks for replying. Your code is much neater, but the code I showed worked in previous versions of CF, and I saw no notes that said it was not allowed.
We were doing this:
<cfcontent type="application/pdf"reset="yes">
<cfoutput>#toString(myPDFbin)#</cfoutput>
As you said, cfcontent assumes “cfoutput”, so that part is unnecessary:
<cfcontent type="application/pdf"reset="yes" variable=”#toString(myPDFbin)#” >
But…………… cfcontent expects binary data, so that “toString()” has to go as well, leaving this:
<cfcontent type="application/pdf"reset="yes" variable=”#myPDFbin#” >
And lo and behold, that worked!
THANK YOU VERY MUCH!
We will have to change quite a few files, but at least it's a simple change, and makes sense.
Thanks Again!
Ian
Copy link to clipboard
Copied
I totally flaked on the toString() thing. But I'm glad that you got it fixed, and thank you for marking my answer correct.
V/r,
^_^
Copy link to clipboard
Copied
Thank you for taking the time to set me right:)
We were very worried that we would be stuck without a solution, so this is an enormous relief, even though we have to change many files. Your solution works fine with CF9 as well, so we can push this out ahead of our upgrade, which makes it even better.
Thanks Again!
Ian