On Tue, Apr 13, 2010 at 11:23 AM, Krishnakant Mane <[email protected]> wrote:
> On Tuesday 13 April 2010 11:48 PM, Thomas G. Willis wrote:
>>
>> I'd have to look at the docs to be sure, but getting the browser to
>> pick it up as a pdf and use the associated application should be a
>> matter of setting the headers correctly on the response.
>>
>> Hey Thomas,
>>
>
> Can you plese mail me off list with that info?
> I am requesting you to do so because I can already see it is getting way too
> off topic for pylons mailing list.
It's not off topic. I have a client who renders PDF in Pylons, and I
may have to do it myself someday. I don't remember offhand if he's
using ReportLab or some other library, but I'll check tonight.
> I really need to know how I can get pdf rendered to the browser
You have to set the content type as Deron said.
response.content_type = "application/pdf"
As for rendering it in the browser window (rather than launching a
viewer application), that's totally up to the browser and plugin. You
have no control over it.
By the way, if the PDF is already in a file with a .pdf extension, you
can use paste.fileapp to send it, which saves some work.
--
Mike Orr <[email protected]>
--
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.