[web2py] Re: Forcing download of generated PDF

2014-12-08 Thread Andy Pardue
I put the output of the pdf generation tool into a StringIO object which is request.body the output never touches the filesystem. (web2py's request.body is an StringIO object) This controller will run in the background and download the document. The headers below are what you need in your

[web2py] Re: Forcing download of generated PDF

2014-12-01 Thread Omar Meat Boy GutiƩrrez
With: return response.stream(open(path, 'rb')) You need save your file first, using tempfile maybe. On Wednesday, October 29, 2014 12:13:39 PM UTC-5, Jason Solack wrote: Hello everyone, i'm generating a PDF using pdfkit and i'd like my function to force the download of the pdf file i'm