4 ms·
Is there a list of open source PDF libraries for various languages? And related: the best tools to generate PDFs from HTML.
by password4321 4y ago
Is there a list of open source PDF libraries for various languages?
And related: the best tools to generate PDFs from HTML.
- mdaniel 4y ago"list" is probably harsh, but I've had good luck trawling through the GitHub topics to find such things: https://github.com/search?p=1&q=topic%3Apdf&type=Repositories https://github.com/search?p=1&q=topic%3Apdf&type=Repositorie... Makes me miss freshmeat.net which would have been my answer a few years ago (freshcode.club just isn't the same, although bless them for trying)
- macintux 4y agoCirca 25 years ago I was newly wed and my wife happened to be watching over my shoulder as I looked up something online. I started typing "fr" and "freshmeat.net" came up as a possible completion. She was, to put it mildly, immediately suspicious of my browsing habits.
- criddell 4y agoThe best generator is Prince XML but it can be expensive.
- pronik 4y agoSeconded. I've recreated a corporate CI with it and had a great time. To have a single compile target is a blessing. Also: the only software I know of written in Mercury.
- e12e 4y agoAs I'm currently fighting with css3/paged media[pm] - I've recently tried to figure it out. Theres a rather comprehensive list at: https://www.print-css.rocks/tools https://www.print-css.rocks/tools As far as Foss tools go, I've only found paged.js (a polyfyll) in combination with a browser print-to-pdf (eg wkhtmltoodf (webkit) or puppeteer (chrome)) that has any semblance of css support. There's also ghostscript - but AFAIK it doesn't support much/any css3 for print. [pm] https://www.w3.org/TR/css-page-3/ https://www.w3.org/TR/css-page-3/
- 2rsf 4y agoI've seen Puppeteer being used successfully in a few projects, it's ugly as hell (you need a VM, a browser and extra software to generate a file) and might require maintenance but it works quite well for simple, mostly textual documents.
- password4321 4y agoPlaywright is a new favorite browser automation tool, I wonder if they've done anything to help with generating PDFs?
- e12e 4y agoThe main issue with the browser based tools is that developers seem to have given up on implementing html/css print standards. So there's a limit to what automation tools have to work with, so to speak. That said, paged.js makes a good effort.
- mdaniel 4y agohttps://playwright.dev/docs/cli#generate-pdf https://playwright.dev/docs/cli#generate-pdf
- stuaxo 4y agoIn python I would choose WeasyPrint most of the time these days.
- g8oz 4y agoDompdf is a good html to pdf library for PHP.