[reportlab-users] Serving a PDF file (naming problem)
Tim Johnson
reportlab-users@reportlab.com
Thu Nov 11 16:54:49 EST 2004
* Matej Pivoluska <pivoluska@matfyz.cz> [041111 00:16]:
> D?a ?t 11. November 2004 01:28 Tim Johnson napísal(a):
> > I am using the following Function:
> > ## code begins
> > def pdf_header(file_name,size):
> > print (
> > 'Content-type: application/pdf\n\n'
>
> Why you print *two* newlines there? (In HTTP is header splitted from body by a
> blank line!
Hi:
See my response to Erik. But prompted by comments, I
eliminated the function and simply put in these two lines:
print 'Content-type: application/pdf\n' ## first line
print 'Content-Disposition: attachment; filename="my_ad.pdf"' ## second line
Absence the second line, IE dialogue presumes it to be
PDF (good). But inclusion of the second *still* does not cause
"my_ad.pdf" to be included.
thank you
tim
--
Tim Johnson <tim@johnsons-web.com>
http://www.alaska-internet-solutions.com
More information about the reportlab-users
mailing list