4 ms·
I just use headless chromium to "print" a generated HTML page as a PDF, works great.
by ranger_danger 4y ago
I just use headless chromium to "print" a generated HTML page as a PDF, works great.
- jdenquin 4y agoLago actually use Gotenberg, it's very nice to manage the headless chromium state without any headache!
- Rafsark 4y agoDid you face any implementation difficulties with your solution?
- rudasn 4y agoNot parent, but if you need headers and footers on each printed page you need to make use of tables.
- simonw 4y agoMy shot-scraper CLI tool has an option that can do exactly that: https://shot-scraper.datasette.io/en/stable/pdf.html https://shot-scraper.datasette.io/en/stable/pdf.html shot-scraper pdf myfile.html -o output.pdf
- a9h74j 4y agoAFAIK uses wkhtmltopdf underneath. Saw a post suggesting Chrome browser developers would prefer not to be offering thin cli support -- presumably for such use cases to use wkhtmltopdf directly.
- ranger_danger 4y agoIt doesn't, and AFAIK they reversed that decision.