Re:Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using He...
by shubhamjain on Tuesday August 22, 2017 @07:20AM
(#15071313)
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 He...
by j_s on Tuesday August 22, 2017 @08:36AM
(#15071727)
PDF generation (especially from a JavaScript-enhanced HTML page) has enough corner cases that it is typically best implemented with commercial support paying someone to polish away the rough edges.
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)
Re:Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using He...
by gima on Tuesday August 22, 2017 @07:59AM
(#15071502)
It's available from the normal Chrome print menu, so you can test it yourself easily.
But to answer: I haven't used it extensively, but CSS and Javascript tend to make it a bit tricky. When you are viewing a webpage in the browser, you have one viewport, and scrolling can change the appearance or position of elements. Translating this to one long PDF is troublesome on some websites. As to what companies do that provide this as a service? I've got no clue, maybe brand this as their unique service? :D
Page.printToPDF: https://chromedevtools.github.io/devtools-protocol/tot/Page/...