Outside the scope of Mezzanine/Cartridge, I am getting amazing results using athenapdf <https://github.com/arachnys/athenapdf> to convert HTML to PDF. I manage a sprawling Python application that had a homebrew and long-in-the-tooth webkit integration in c++ and Python to generate PDF. I replaced it with http calls to the athenapdf microservice. The performance and quality have been astounding.
-ken On Tue, Jun 28, 2016 at 8:24 AM, Joseph Mohan <[email protected]> wrote: > Thanks for your help. > > I've spent the last 2 days pulling xhtml2pdf apart and still cannot get > this to work. It seems to just not recognize any src attribute on an img > tag, even tried brute forcing it but > > xhtml2pdf also seems to now be abandoned > <https://github.com/xhtml2pdf/xhtml2pdf> and their python3 support is > shaky.. hense why i'm struggling so much. > > Had a quick look at weazyprint <http://weasyprint.org/> but having > trouble installing it on my dev machine let alone my production shared > servers.... > > Anyone had any luck using an alternative to xhtml2pdf? > > > On Friday, 24 June 2016 16:03:41 UTC+1, Eduardo Rivas wrote: >> >> Well, Cartridge uses Pisa >> <https://github.com/stephenmcd/cartridge/blob/master/cartridge/shop/views.py#L391> >> to create the PDFs. Apparently you can pass a "link_callback" arg to >> CreatePDF(). This callback should handle the conversion of the relative >> path of the image in the HTML to the complete filesystem path to be >> embedded in the document. >> >> The xhtml2pdf docs provide a full example >> <https://github.com/xhtml2pdf/xhtml2pdf/blob/master/doc/usage.rst#using-xhtml2pdf-in-django>. >> You'll need to override the invoice view to pass the callback to >> CreatePDF(). >> > -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
