开发者

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

开发者 https://www.devze.com 2022-12-25 21:33 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve th开发者_开发问答is question

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.


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


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消