Y
Hacker News
new
|
ask
|
show
|
jobs
by
ranger_danger
1424 days ago
I just use headless chromium to "print" a generated HTML page as a PDF, works great.
4 comments
simonw
1424 days ago
My shot-scraper CLI tool has an option that can do exactly that:
https://shot-scraper.datasette.io/en/stable/pdf.html
shot-scraper pdf myfile.html -o output.pdf
link
a9h74j
1424 days ago
AFAIK 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.
link
ranger_danger
1422 days ago
It doesn't, and AFAIK they reversed that decision.
link
jdenquin
1424 days ago
Lago actually use Gotenberg, it's very nice to manage the headless chromium state without any headache!
link
Rafsark
1424 days ago
Did you face any implementation difficulties with your solution?
link
rudasn
1424 days ago
Not parent, but if you need headers and footers on each printed page you need to make use of tables.
link