Re:Show HN: PlutoPrint – Generate PDFs and PNGs from HTML wi...
by sammycage on Wednesday August 20, 2025 @06:04PM
(#44967015)
That’s a good point. Using Puppeteer or a headless browser gives you essentially full web platform support. The tradeoff is that it comes with a heavier runtime and more moving parts (Chromium, Node, etc.). PlutoPrint aims to be much lighter: no browser dependency, just a compact C++ engine with a Python wrapper. It does not cover the entire browser feature set but it is fast, portable, and easy to drop into projects without the overhead of a full browser.
Re:Show HN: PlutoPrint – Generate PDFs and PNGs from HTML wi...
by nicoburns on Wednesday August 20, 2025 @06:41PM
(#44967274)
Interesting. I was not aware of PlutoBook!
We're doing a very similar thing (custom lightweight engine) over at https://github.com/DioxusLabs/blitz. We have more of a focus on UI, but there's definitely overlap (we support rendering to image, but don't have pagination/fragmentation implemented).
Have you run the WPT tests against your engine to test spec conformance?
Re:Show HN: PlutoPrint – Generate PDFs and PNGs from HTML wi...
by realitysballs on Thursday August 21, 2025 @05:07AM
(#44970626)
Excellent response
Re:Show HN: PlutoPrint – Generate PDFs and PNGs from HTML wi...
by nutjob2 on Thursday August 21, 2025 @05:48AM
(#44970845)
Your approach is also more predictable. Trying to figure out why Chromium is doing something strange with a complicated page is not practical, while a simple, lean package like this means you can look at the code, trace it and patch it if need be.
Re:Show HN: PlutoPrint – Generate PDFs and PNGs from HTML wi...
by specproc on Thursday August 21, 2025 @11:46AM
(#44974231)
I did this for a project recently, using Firefox and Selenium. It totally worked, but was very heavy on the dependencies and felt very clumsy.
This is exactly what I was looking for a few months ago. I might revisit that project with it.
Re:Show HN: PlutoPrint – Generate PDFs and PNGs from HTML wi...
by slig on Wednesday August 20, 2025 @06:07PM
(#44967038)
Exactly what I was wondering. I use puppeteer to render these [1] printable puzzles pages, and I use SVG, JavaScript to dynamically resize the text to fit a page, etc. Just works.
[1]: https://ahapdf.nyc3.cdn.digitaloceanspaces.com/samplers/logi... (PDF)
Re:Show HN: PlutoPrint – Generate PDFs and PNGs from HTML wi...
by strbean on Friday August 22, 2025 @01:22PM
(#44987167)
Gotenberg[0] wraps up Chromium nicely for this purpose. However, at scale, spinning up Chromium for each PDF you want to generate is painful. I'd definitely consider a solution like PlutoPrint.
Asking your favorite LLM will give you da codez
PS: I'm not trying to discount this tool. I'm only pointing out an alternative that might be useful