Highlighted

CF is unable to get the binary file as a PDF in to Browser.

New Here ,
Mar 16, 2017

Copy link to clipboard

Copied

After using the ActivePDF Toolkit function "Get_OutputByteStream" to put the manipulated PDF into a binary data variable (variable name "pdf"), I then pass that variable into CFCONTENT to display it in the user's browser.

<cfcontent type="application/pdf" variable="#pdf#">

However, the result is now a CF error page which says:

"[S is not a supported variable type. The variable is expected to contain binary data."

We tried everything suggested in

cfcontent no longer works with ActivePDF in CF2016 [dealbreaker]

I would like to know whether we could get some assistance with regards to this issue. We are able to provide you with evaluation key of ActivePDF toolkit and the script that we have trouble with. So far, we have tested with Classic ASP as well ASP.net and C# applications. They all work. The issue is with ColdFusion.

Views

727

Likes

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

CF is unable to get the binary file as a PDF in to Browser.

New Here ,
Mar 16, 2017

Copy link to clipboard

Copied

After using the ActivePDF Toolkit function "Get_OutputByteStream" to put the manipulated PDF into a binary data variable (variable name "pdf"), I then pass that variable into CFCONTENT to display it in the user's browser.

<cfcontent type="application/pdf" variable="#pdf#">

However, the result is now a CF error page which says:

"[S is not a supported variable type. The variable is expected to contain binary data."

We tried everything suggested in

cfcontent no longer works with ActivePDF in CF2016 [dealbreaker]

I would like to know whether we could get some assistance with regards to this issue. We are able to provide you with evaluation key of ActivePDF toolkit and the script that we have trouble with. So far, we have tested with Classic ASP as well ASP.net and C# applications. They all work. The issue is with ColdFusion.

Views

728

Likes

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
Mar 16, 2017 0
LEGEND ,
Mar 16, 2017

Copy link to clipboard

Copied

I'll hazard a guess and suggest that the PDF object within the variable probably has spurious data at the very beginning that CF doesn't recognize as PDF.  That's the only thing that I can think of.

V/r,

^_^

Likes

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
Reply
Loading...
Mar 16, 2017 0
New Here ,
Mar 16, 2017

Copy link to clipboard

Copied

It could be the issue. Works perfectly with ASP and ASP.NET and C#. The issue is with CF. I am trying to figure out a way to see entire binary using CF.

Likes

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
Reply
Loading...
Mar 16, 2017 0
Advocate ,
Mar 17, 2017

Copy link to clipboard

Copied

You could use cffile to write the variable to a file, unless you get a similar "not a binary variable" error. If it succeeds, you will be able to interrogate what was written to the file.

Cheers

Eddie

Likes

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
Reply
Loading...
Mar 17, 2017 0
New Here ,
Mar 24, 2017

Copy link to clipboard

Copied

Still the same issue. Unable to display the binary.

Likes

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
Reply
Loading...
Mar 24, 2017 0
Advocate ,
Mar 24, 2017

Copy link to clipboard

Copied

The point of my suggestion was to write the binary data to a file so that you can interrogate the file outside of ColdFusion to ensure it is a valid PDF file.

Was the file successfully written? Can you load it in a PDF viewer application?

Cheers

Eddie

Likes

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
Reply
Loading...
Mar 24, 2017 0
New Here ,
Apr 04, 2017

Copy link to clipboard

Copied

I have attached the cf script and the input PDF file. My CF knowledge is limited ( novice).

I hope you can help me to modify the CF script and include cffile portion of it. Then I can run it in my machine and get you the file you are looking for.

I am sorry for the delay.

Likes

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
Reply
Loading...
Apr 04, 2017 0