Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any viable alternatives to wkhtmltopdf on windows, for html to pdf conversion? [closed]

I've found wkhtmltopdf, which looks good on the surface and works fine in very small cases, but it doesn't provide any real css control over the rendering.

By that I mean it doesn't use the print media type and page breaks are not respected, as well, on windows you can't control the names of some header/footer variables, or generate a TOC off of teh h1 tags.

Are there any real open source alternatives, I've tried xhtml2pdf which is a python library actually called pisa, but it requires reportlab which doesn't play nice windows.

I'm actually programming in .net but if its good and open source, the language isn't a huge issue.

like image 767
DevelopingChris Avatar asked Apr 08 '10 13:04

DevelopingChris


3 Answers

This is an old stackoverflow question, but because google took me here, it could be helpful for somebody else. Weasyprint should support what the author was looking for.
It supports print css features like page break.

Try weasyprint

like image 114
yvess Avatar answered Oct 21 '22 15:10

yvess


It turns out there was no open source alternative that was simpler, but on windows wkhtmltopdf is just not the best thing, so we paid for a better solution.

Winnovative's PDF library is what we used

like image 39
DevelopingChris Avatar answered Oct 21 '22 17:10

DevelopingChris


While it is not open-source, I use ABCPDF. I have a template page in .NET that I use for a wrapper to set up a custom stylesheet for generating PDFs only.

like image 33
Diodeus - James MacFarlane Avatar answered Oct 21 '22 16:10

Diodeus - James MacFarlane