Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
51–60 of 82 posts
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#52Whould this work on AWS Lambda?
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#53What's up with the built in queue? I feel like that belongs in a different script. For one, the built in nodeJS queue is useless in a multiple server environment. You'd still need a distributed queue since this built in one is only local to one server/thread. So the built in queue becomes redundant/pointless for any kind of solution that needs to scale
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#54Whould this work on AWS Lambda?
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#55Are there any similar wrappers around headless Firefox, which has been released recently (Firefox 55)? Mozilla'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
#56Pretty cool! Check out Google's headless browser API Puppeteer too, they provide a few really useful functions for doing stuff like this. https://github.com/GoogleChrome/puppeteer/blob/master/exampl... Really easy to work around, I used it to build a simple CLI to generate device screenshots of a webpage by modifying the user-agent and resolution to match each device. https://github.com/umpox/generateDeviceScreenshot…
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#57Earlier quoted context omitted.
I agree with you but as a 'old' developer, I find it pretty sad that you have to fire up a headless browser + its gigaton of code, to convert a SVG to PNG. But I agree with you, headless chrome can be very useful.
I take your point in general, but I'm not sure this specific task - converting of SVGs - has ever been one that has easily been solved by some tiny amount of code: probably the way I would have done this in the past (say, ten years ago) would have been using Apache Batik's rasteriser, which is far from a lightweight solution itself.
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#58I am currently using athenapdf[1] but I will have a play with pdf-bot.
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#59All I need now is CMYK support in Chrome and I can make HTML based print ready PDF rendering. That would be quite upgrade compared to my current options.
Please file a bug report if you think this is an important feature.
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#60Earlier 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?