ReptarX / pyfpdf

Automatically exported from code.google.com/p/pyfpdf
GNU Lesser General Public License v3.0
0 stars 0 forks source link

"Send the file to browser" options of output isn't applicable #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
All of these print to stdout, but the wording suggests they do different things 
although "sending to browser" doesn't make sense in python: 

I: send the file inline to the browser. The plug-in is used if available. The 
name given by name is used when one selects the "Save as" option on the link 
generating the PDF.
D: send to the browser and force a file download with the name given by name.
S: return the document as a string. name is ignored.

You are probably better of doing "raise NotImplemented" on at least I and D or 
removing them altogether.

Original issue reported on code.google.com by kitsu...@gmail.com on 13 Sep 2012 at 9:15

GoogleCodeExporter commented 9 years ago
Try this:

web.header('Content-Type', 'application/pdf')

return pdf.output('tuto1.pdf','S')

Original comment by salvador...@gmail.com on 18 Nov 2014 at 9:54