Alex,

Have you checked the headers? Could it be that the pdf-file is displayed
as a text/html resource (use cfheader to set the correct header)

--
Hugo Ahlenius

-------------------------------------------------------------
Hugo Ahlenius                  E-Mail: [EMAIL PROTECTED]
Project Officer                Phone:            +46 8 230460
UNEP GRID-Arendal              Fax:              +46 8 230441
Stockholm Office               Mobile:         +46 733 467111
                               WWW:       http://www.grida.no
-------------------------------------------------------------

  

|-----Original Message-----
|From: Alexander Sherwood [mailto:[EMAIL PROTECTED]
|Sent: Thursday, October 07, 2004 17:26
|To: CF-Talk
|Subject: CFCONTENT and GetPageContext()
|
|Greetings.
|
|Anyone run into problems with using GetPageContext().Include()
| and CFCONTENT to serve, say a PDF file, on the same page.
|
|
|If I use the following code at the top of a template,
|everything works as expected: the download dialog pops up in
|the browser:
|
|<cfheader name="Content-disposition"
|VALUE="attachment;filename=document.pdf">
|<cfcontent file="#PathToFileOnDisk#" type="application/pdf"
|deletefile="yes">
|
|
|If, however, I do a GetPageContext().Include() to include the
|file with the CFCONTENT and CFHEADER tags, the PDF binary data
|gets displayed as a string, right in the browser (instead of
|prompting for download, or opening directly in Acrobat Reader).
|
|Any ideas on a possible conflict with using
|GetPageContext().Include() and changing HTML head content?
|
|Any pointers would help!
|
|----------------------------------
|Alex Sherwood
|PHS Collection Agency
|THE COLLECTORS
|P:   813-283-4579
|F:   301.664.6834
|W: www.phs-net.com
|
|
|
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to