How 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.
Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
41–50 of 82 posts
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#42Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#43How 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.
There's CSS that's supposed to help with doing this manually, right? Or does your docx export handle this auto-magically? (If so, I'm interested in more details!) https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-...
One of the best ways I've used to generate PDFs is by using a DOCX as a template, and replacing certain placeholders within the document (a DOCX is a ZIP containing a few XML files). It's great if you work in a corporate environment, as it's easy for non-technical staff to make it look exactly how they want and it's easy to update (just replace a file and check it works). You can use headless LibreOffice to convert DOCX to PDF.
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#44How does this compare to wkhtmltopdf, which, IIRC, uses WebKit to render the pdf?
We actually used wkhtmltopdf before we started using pdf-bot. wkhtmltopdf development has slowed a lot, it is very unstable and you need to run a 2 year old alpha version to support flexbox (if I remember correctly) :-) headless chrome is a lot more stable choice imo.
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#45How 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.
Just use WkhtmlToPdf https://wkhtmltopdf.org and wrap a simple service around it.
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#46How 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.
Just use WkhtmlToPdf https://wkhtmltopdf.org and wrap a simple service around it.
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#47Earlier quoted context omitted.
There's CSS that's supposed to help with doing this manually, right? Or does your docx export handle this auto-magically? (If so, I'm interested in more details!) https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-...
CSS isn't really that flexible though, say you want a repeated header or footer on each page, you are going to have a real hard time getting it to work perfectly. And good luck if you then need to internationalize it and support different document sizes (A4 vs legal). It's not impossible, but it's a lot more work than it should be. One of the best ways I've used to generate PDFs is by using a DOCX as a template, and…
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#48Really nice work. I've had a great experience working with Headless Chrome to convert webpages to PDF for my side project EmailThis ( https://www.emailthis.me ). It uses Puppeteer by Chrome DevTools team - https://github.com/GoogleChrome/puppeteer .
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#49Really nice work. I've had a great experience working with Headless Chrome to convert webpages to PDF for my side project EmailThis ( https://www.emailthis.me ). It uses Puppeteer by Chrome DevTools team - https://github.com/GoogleChrome/puppeteer .
Just a heads up -- your site emailthis.me is down.
Re: Show HN: Pdf-Bot, an API/CLI for Generating PDFs Using Headless Chrome
#50Earlier quoted context omitted.
Just use WkhtmlToPdf https://wkhtmltopdf.org and wrap a simple service around it.
DonnyV don't you know we need 15 million of the same things in technology :)