On Tuesday 13 April 2010 11:59 PM, Deron Meranda wrote:
You can send the PDF just as you would any other type of
*binary* file, such as an image....do not attempt to process
it as text. Use the content-type header of "application/pdf".
Where do I set this header in context to a pylons controller action?
Should I do it in the respective method from where the pdf file is to be
rendered?
Another question is that should I use return render(/report.mako) or is
there some thing different I will have to do once I set the response
header to "application/pdf"?
Note if you have large reports, you may want to see if you
can support the HTTP byte-ranges protocol. This is because
PDF files are read starting at the end of the file, and then
in a random-access manner on a page-by-page basis.
So if you have a 500 page report, a person can immediately
read page 1, or page 250, without waiting for the entire
PDF file to download. ....
No, the pdf files are going to be 1 page or in rare cases at the most 2
pages.
And by any chance is some thing similar possible for open office
spreadsheets?
Happy hacking.
Krishnakant.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.