This isn't going to work... You code for "exporting" to excel only works because Excel knows how to deal with HTML data; the PDF viewer does not know how to deal with HTML and it fails.  To the best of my knowledge, changing headers, etc won't make a difference.

-----Original Message-----
From: Chunshen (Don) Li [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 10, 2004 10:35 AM
To: CF-Talk
Subject: Re: Export to Excel ok, PDF not ok

Sorry, the msg were not clear enough, following is my editing.

> It seems strange, the following code would work to export current page
> to Excel format but not PDF format (though a pdf doc is generated, its
> format seems incorrect for PDF reader failed to open it).
>

Code for exporting to Excel:
<cfheader name="Content-Disposition"
value="attachment;filename=file123.xls">
<cfcontent type="application/msexcel">

Code for exporting to PDF:
<cfheader name="Content-Disposition"
value="attachment;filename=file123.pdf">
<cfcontent type="application/pdf">

(content to be exported or included in the desired format)
dynamic page data in HTML table format.
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to