CFCONTENT Problem with PDF Files

2002-12-09 Thread Tim Haak
Hello,

I am trying to send a PDF to the user so it loads in their browser window.  The code I 
am using is:

cfheader name=Content-type value=application/pdf
cfcontent deletefile=no file=C:/Inetpub/wwwroot/cfmxdemo/itworks.pdf 
type=application/pdf

Note:  I also tried a content-type of x-application/pdf but that didn't work either.

IE 5.5 SP2 just loads the PDF as plain text but Netscape 7.0 works fine and opens the 
Acrobat Plugin in the browser.  I also tried using CFFILE to readBinary the file from 
the server but wasn't able to output/open the file because the binary stored in the 
variable could not be converted to a string.  Here is the code I tried to get that to 
work:

cffile file=C:\Inetpub\wwwroot\cfmxdemo\itworks.pdf action=readBinary 
variable=test
cfoutput#variables.test#/cfoutput

Has anyone had any luck with CFCONTENT and PDF files, especially in IE 5.5 SP2?  My 
environment is: Windows 2000 Professional SP3, ColdFusion MX 6,0,0,48097 (Developer 
version), IIS 5.0.

Thanks in advance.


Tim Haak
[EMAIL PROTECTED]



RE: CFCONTENT Problem with PDF Files

2002-12-09 Thread Rob Rohan
I have - I use it quite a bit with cfx_treebeard. I used

cfcontent type=application/pdf ...

instead of cfheader. Works for me.

Rob

http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Tim Haak [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 8:52 AM
To: CF-Talk
Subject: CFCONTENT Problem with PDF Files


Hello,

I am trying to send a PDF to the user so it loads in their browser window.
The code I am using is:

cfheader name=Content-type value=application/pdf
cfcontent deletefile=no file=C:/Inetpub/wwwroot/cfmxdemo/itworks.pdf
type=application/pdf

Note:  I also tried a content-type of x-application/pdf but that didn't
work either.

IE 5.5 SP2 just loads the PDF as plain text but Netscape 7.0 works fine and
opens the Acrobat Plugin in the browser.  I also tried using CFFILE to
readBinary the file from the server but wasn't able to output/open the file
because the binary stored in the variable could not be converted to a
string.  Here is the code I tried to get that to work:

cffile file=C:\Inetpub\wwwroot\cfmxdemo\itworks.pdf action=readBinary
variable=test
cfoutput#variables.test#/cfoutput

Has anyone had any luck with CFCONTENT and PDF files, especially in IE 5.5
SP2?  My environment is: Windows 2000 Professional SP3, ColdFusion MX
6,0,0,48097 (Developer version), IIS 5.0.

Thanks in advance.


Tim Haak
[EMAIL PROTECTED]

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm