Live data from Hacker News

Show HN: PlutoPrint – Generate PDFs and PNGs from HTML with Python

github.com

31–40 of 51 posts

Re: Show HN: PlutoPrint – Generate PDFs and PNGs from HTML with Python

#31
post #21

This isn't theoretical. In my 20 years in retail and logistics, I've seen these libraries repeatedly fail in production. Real world examples include: * Invoices: Totals get pushed to a new page with no repeated header. This is a classic failure of CSS table rendering across page breaks. properties like page-break-inside: avoid are notoriously inconsistent in browser print to PDF engines. Line items get split mid row…

Yeah exactly we were using fpdf heavily but now switched to Typst since its faster to iterate complex documents on.

Re: Show HN: PlutoPrint – Generate PDFs and PNGs from HTML with Python

#32
post #9

This is so efficient, i just tested it ,far better than weasyprint, and it has both python and c++ repo, bro am amazed, Are you open for sponsorship?

What OS did you test on? It completely crashed my python process on mac

Thanks for the feedback. We’ve tested PlutoPrint on multiple platforms, including Windows and Linux, and it generally works well there. Mac-specific issues like crashes or empty outputs are definitely on our radar, and we’re investigating potential causes such as font handling, reverse mtime warnings, or system library differences. We’re also tracking bugs and improvements on the GitHub repo: https://github.com/plutoprint/plutoprint/issues. Contributions, bug reports, and additional test results from different environments are very helpful and appreciated as we continue to improve stability across all platforms.

Re: Show HN: PlutoPrint – Generate PDFs and PNGs from HTML with Python

#33
post #16

Does this support full flexbox styling? What are the known issues or the unsupported css this library has?

PlutoPrint supports a large subset of CSS, including flexbox for most common layouts, but it’s not a full browser engine, so there are some limitations. You can see a more complete list of supported features here: https://github.com/plutoprint/plutobook/blob/main/FEATURES.m.... We’re also actively tracking bugs and improvements on the GitHub repo: https://github.com/plutoprint/plutoprint/issues, and contributions or test cases are always appreciated to help expand coverage.

Re: Show HN: PlutoPrint – Generate PDFs and PNGs from HTML with Python

#35

Comparing it to typst ?

Typst and PlutoPrint serve somewhat different purposes. Typst is more like a modern typesetting language, focusing on fully programmatic document layouts with its own syntax, while PlutoPrint is a Python library built on a C++ rendering engine that converts HTML or XML into PDFs and PNGs. PlutoPrint’s strengths are fast rendering, strong SVG support, and integration with existing Python workflows, whereas Typst is great if you want a typesetting DSL with precise layout control from the ground up.

Re: Show HN: PlutoPrint – Generate PDFs and PNGs from HTML with Python

#36

Isn't the interesting part the CSS renderer PlutoBook (C++) rather than the Python wrapper here?

Yes definitely, its does the heavy lifting and is essentially a new from scratch HTML rendering engine.

It needs javascript support so charting libraries work but they mention working toward that in the roadmap.

It's more like PrinceXML than a browser. This is great Prince is the gold standard for HTML print out and the only engine to fully support Paged Media level 3 last time I looked. Normal browsers don't seem to care as much about full print css support so Prince has a monopoly here and is not cheap.

https://www.princexml.com

Re: Show HN: PlutoPrint – Generate PDFs and PNGs from HTML with Python

#38
post #9

This is so efficient, i just tested it ,far better than weasyprint, and it has both python and c++ repo, bro am amazed, Are you open for sponsorship?

What OS did you test on? It completely crashed my python process on mac

It is working perfectly on my use case. On my Windows.

Re: Show HN: PlutoPrint – Generate PDFs and PNGs from HTML with Python

#39

Hi, have you tested it with google colab notebooks? Printing those things is really difficult. All the time I get split cells (with some rows not printed) and every kind of problems (like broken word wrap etc).

Hi! We haven’t specifically tested Colab notebooks. They’re tricky because of dynamic layouts and tables, but simpler notebook exports to HTML might work better. Any feedback or test cases would be super helpful to improve support.
Post reply on HN