How does this compare to wkhtmltopdf, which, IIRC, uses WebKit to render the pdf?
Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
31–40 of 82 posts
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#32Earlier quoted context omitted.
It uses Chrome's built-in print-to-PDF functionality via Chrome Debug/DevTools Protocol. In other words it creates PDF files with real vector graphics and text, not just images embedded in PDF. Page.printToPDF: https://chromedevtools.github.io/devtools-protocol/tot/Page/...
I didn't know that existed. How good is it with corner cases? HTML->PDF is a notoriously difficult problem; even generating PDF is. There are several software services which charge well for doing that (Docraptor, PrinceXML). If it's smooth and handles everything well, is there any reason someone should pay for them?
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#33Mozilla's documentation (https://developer.mozilla.org/en-US/Firefox/Headless_mode) is still incomplete.
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#34Nice work ! Depending on your use case, I feel like you guys might be interested in http://weasyprint.org/ . It is an open source HTML to PDF converter written in Python. It passes the Acid2 test and implements CSS Paged Media.
I recently discovered https://github.com/ArthurHub/HTML-Renderer formerly know as https://htmlrenderer.codeplex.com/
PDF generation [...] 100% managed (C#), High performance HTML Rendering library
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#35Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#36Interesting to compare this to some of the "old school" solutions for converting web pages to PDF such as htmldoc[0] or html2ps[1]. [0] https://github.com/michaelrsweet/htmldoc [1] http://user.it.uu.se/~jan/html2ps.html
The old school solutions lack any sort of javascript support (per the docs, htmldoc doesn't even support css), so they wouldn't work for a lot of real world websites. That's not really the same use case. A better comparison would be against the likes of wkhtmltopdf[0], which uses webkit, or the pdf generation features of phantomjs. [0] https://wkhtmltopdf.org/
1,047 Open 975 Closed
Yep, that's about how I remember it. It was such a pain to build on Windows (especially to get a single static binary) that people contributing fixes would often attain hero status by attaching a random binary to an issue. Specifically, GIF support was broken on the official Windows build for 4+ years:
https://web.archive.org/web/20140917181225/http://code.googl...
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#37How well does it work with multiple-page PDFs? One of our banes is generating mixed text/image downloadable reports with sensible page breaks. To save time, we're actually doing those as docx files, with the bonus/risk that clients can edit the content before saving it as a PDF.
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#38How does this compare to wkhtmltopdf, which, IIRC, uses WebKit to render the pdf?
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#39How well does it work with multiple-page PDFs? One of our banes is generating mixed text/image downloadable reports with sensible page breaks. To save time, we're actually doing those as docx files, with the bonus/risk that clients can edit the content before saving it as a PDF.
https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-...
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#40Earlier quoted context omitted.
It uses Chrome's built-in print-to-PDF functionality via Chrome Debug/DevTools Protocol. In other words it creates PDF files with real vector graphics and text, not just images embedded in PDF. Page.printToPDF: https://chromedevtools.github.io/devtools-protocol/tot/Page/...
I didn't know that existed. How good is it with corner cases? HTML->PDF is a notoriously difficult problem; even generating PDF is. There are several software services which charge well for doing that (Docraptor, PrinceXML). If it's smooth and handles everything well, is there any reason someone should pay for them?
There are many "free as in beer" (closed-source), freemium, and/or free trial options offered as a carrot leading to a commercial product. Most have a watermark and/or page count limitations.
http://selectpdf.com/community-edition/ (5 pages max)