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]

Reply via email to