Tomasz Narloch pisze:
> Tomasz Narloch pisze:
>   
>> Hi,
>>
>> mod_wsgi: When I want to download a invoice in pdf I get: 404 Not Found
>> On paster server: I'm getting my invoice in pdf without any problem
>>
>> I generate invoice in pdf on the fly.
>> I use reportlab and my function is something like that:
>>
>> def getInvoice():
>>     [...]
>>     buffer = StringIO.StringIO()
>>     doc = SimpleDocTemplate(
>>             buffer,
>>             showBoundary=0,
>>             topMargin=0.75*inch,
>>             rightMargin=0.5*inch,
>>             leftMargin=0.5*inch,
>>             bottomMargin=0.75*inch,
>>             allowSplitting=1,
>>             pagesize=A4,
>>             pageCompression=1 # in my pdf not work with ttf font without 
>> images, plain text with tables, paragraphs
>>     )
>>     [...]
>>     buffer.seek(0)
>>     return buffer
>>
>> # NEXT in controller method:
>>
>>     [...]
>>     response.headers['Content-type'] = 'application/pdf'
>>     response.headers['Content-disposition'] = 'attachment; filename=%s' 
>> % filename
>>     
I solve the problem:)
Probably filename have a unicode chars and this was a problem.

Regards,
Tomek


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to