Modifications below > from reportlab.pdfgen import canvas > from cSringIO import StringIO > > def some_view(): > # Create the HttpResponse object with the appropriate PDF headers. > response.headers['Content-Type']='application/pdf') > response.headers['Content-Disposition'] = > 'attachment;filename=somefilename.pdf' > > # Create the PDF object, using the response object as its "file." > s=StringIO() > p = canvas.Canvas(s) > > # Draw things on the PDF. Here's where the PDF generation happens. > # See the ReportLab documentation for the full list of functionality. > p.drawString(100, 100, "Hello world.") > > # Close the PDF object cleanly, and we're done. > p.showPage() > p.save() > return s.getvalue()
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

