[thelist] Dynamic PDF files - Mac Users
Mike Migurski
mike at saturn5.com
Mon Jan 13 15:36:00 CST 2003
>I need some help from the Mac users on the list.
>
>We have some dynamically generated pdf files on our web site (and even
>more on our intranet site). The pdf file is filled with information from
>our database and corresponds with the information that is displayed on
>the web site.
It looks as though the headers you provide are incomplete, which is
probably the source of the problem - I'd be willing to bet that non-IE
browsers for the PC also might have issues. You are providing just the
data in the file, with no meta-information to help browsers figure out
what do with it.
The HEAD of http://www.winebow.net/pdf/generatePDF.asp?prodID=206 looks
like this:
Server: Microsoft-IIS/4.0
Date: Mon, 13 Jan 2003 21:05:44 GMT
Content-Type: application/vnd.fdf
The Content-Type header should have the type set to "application/pdf" so
that browsers correctly interpret the result. Also, you will want to set
the Content-Disposition header to something like:
Content-Disposition: attachment; filename="example.pdf"
...so that the browser does not attempt to open the file in a new window
(as mine did) and does not save it with a .asp file extension, as mine
did.
Finally, throw in a Content-length: <size in bytes> header for good
measure, so browsers can provide user feedback on download progress.
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
http://www.saturn5.com/mike/contact.html
"Freedom! Horrible, horrible freedom!"
More information about the thelist
mailing list