Re: [pylons-discuss] Dynamically-generated PDF to download

2018-10-19 Thread Alex
I know this thread is quite old but it's probably still relevant. We created a report tool since generating pdf reports in a web application is a common problem and none of the existing solutions were optimal for us. We recently released the first stable version 1.0 of our tool ReportBro:

Re: [pylons-discuss] Dynamically-generated PDF to download

2015-01-30 Thread Tom Lazar
Fyi I've had good experiences using phantomjs Sent from a phone, please excuse the brevity. On 25.01.2015, at 18:17, Wichert Akkerman wich...@wiggy.net wrote: On 25 Jan 2015, at 14:40, Adam Morris adam.mor...@igbis.edu.my wrote: Okay, I get that bit now, and coded it up, but when I go

Re: [pylons-discuss] Dynamically-generated PDF to download

2015-01-26 Thread Jonathan Vanasco
Just want to give a quick warning that a lot of the pdf libraries use crazy amounts of memory. I have no experience with pdfkit, and it may behave differently. If it causes issues with memory/performance, I usually handle this stuff in Pyramid one of two ways: a- I segment out the PDF

Re: [pylons-discuss] Dynamically-generated PDF to download

2015-01-25 Thread Wichert Akkerman
On 25 Jan 2015, at 07:37, Adam Morris adam.mor...@igbis.edu.my wrote: I have a view that serves up a page that whose template/css contain both define screen and print media. Which means the view's renderer provides a page that serves up html that is formatted for the browser (screen

Re: [pylons-discuss] Dynamically-generated PDF to download

2015-01-25 Thread Wichert Akkerman
On 25 Jan 2015, at 14:40, Adam Morris adam.mor...@igbis.edu.my wrote: Okay, I get that bit now, and coded it up, but when I go to render it, I use the pyramid.renderers.render object but obviously it ends up downloading a corrupted file because it's not even in PDF format. You are still

Re: [pylons-discuss] Dynamically-generated PDF to download

2015-01-25 Thread Adam Morris
Got it working now. Problem was that it was that pdfkit was outputting everything... even verbose stuff, would have thought that would have been off. Thanks for your help. On Monday, January 26, 2015 at 8:20:55 AM UTC+8, Adam Morris wrote: Okay, I've identified pdfkit but with the following

Re: [pylons-discuss] Dynamically-generated PDF to download

2015-01-25 Thread Adam Morris
Okay, I get that bit now, and coded it up, but when I go to render it, I use the pyramid.renderers.render object but obviously it ends up downloading a corrupted file because it's not even in PDF format. So does reportlab have something to take that html/css and paint it to a Canvas or

Re: [pylons-discuss] Dynamically-generated PDF to download

2015-01-25 Thread Adam Morris
Okay, I've identified pdfkit but with the following code I get a blank pdf downloaded, I must be doing something wrong...: from pyramid.renderers import render from pyramid.response import Response import pdfkit import StringIO result =