- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsI am trying to save a PDF file (which I am being passed from a adobe pdf submit service as I think a binary stream) in a browser, I just want the PDF to saved so I can attach it and email it. What CFM should I use to retrieve the submitted pdf content in a binary and retain a valid pdf file ?- I found the below code here as one answer but it is not doing binary stuff. The problem I am having is that the pdf that I reconstruct is .close. looking but not valid; I think I see it is losing carriage returns or something it is not good please point me an the correct binary in statements...
I think I need to do what this person did but with CFM
http://www.experts-exchang
<cfscript>
pc = GetPageContext();
req = pc.getRequest();
readerObj = req.getReader();
output = '';
line = readerObj.readLine();
while (isDefined("line")) {
output = output & line;
line = readerObj.readLine();
}
readerObj.close();
</cfscript>
<cfoutput>#output#
</cfoutput>
I also tried this but the content was empty?.....content [empty string]
<cfset x = GetHttpRequestData()>
<cfoutput><hr><cfdump var="#x#"><br></cfoutput>
struct
content [empty string]
headers struct
ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpo
ACCEPT-ENCODING gzip, deflate
ACCEPT-LANGUAGE en-us
CACHE-CONTROL no-cache
CONNECTION Keep-Alive
CONTENT-LENGTH 158289
CONTENT-TYPE application/pdf
COOKIE CFID=129137; CFTOKEN=45168361; SC_ID=; TOMANYATTEMPTMSG=
USER-AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
method POST
protocol HTTP/1.1
This question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership