Live data from Hacker News

Show HN: I am building a new Python library to read/write PDF files

github.com

121–126 of 126 posts

Re: Show HN: I am building a new Python library to read/write PDF files

#121
post #74

Is there a list of open source PDF libraries for various languages? And related: the best tools to generate PDFs from HTML.

As 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 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/a…

Playwright is a new favorite browser automation tool, I wonder if they've done anything to help with generating PDFs?

Re: Show HN: I am building a new Python library to read/write PDF files

#122
post #74

Earlier quoted context omitted.

As 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 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/a…

Playwright is a new favorite browser automation tool, I wonder if they've done anything to help with generating PDFs?

The 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.

Re: Show HN: I am building a new Python library to read/write PDF files

#124
post #74

Earlier quoted context omitted.

As 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 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/a…

Playwright is a new favorite browser automation tool, I wonder if they've done anything to help with generating PDFs?

https://playwright.dev/docs/cli#generate-pdf

Re: Show HN: I am building a new Python library to read/write PDF files

#125

I once had to help an accountant friend to fill in 1000's of docx files, and convert them to pdf. No open source tool does a proper conversion, it really sucked.

>No open source tool does a proper conversion //

Presumably the key word here is "proper" because LibreOffice, etc., read docx and write pdf. For example, `libreoffice --headless --convert-to pdf myfile.docx`.

Re: Show HN: I am building a new Python library to read/write PDF files

#126
post #105

Earlier quoted context omitted.

Seconded. 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.

Mercury and Rust (according to Wikipedia).

Rust is probably a recent development, it's been a long time I last checked up on PrinceXML. Might also mean that Mercury is on the way out long to middle term.
Post reply on HN