Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
41–50 of 170 posts
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#42Don’t. Show a web page and open the print dialog, and tell people to save as PDF. All major browsers support this, and the browser HTML to PDF code is the most robust and accurate.
There's nothing in OP's question that suggests this is a one-off operation in response to a user action. It's very likely to be a massive batch operation of a ton of HTML files that might not even be their own site.
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#43This would be far more efficient than spinning up an entire browser and printing PDFs to disk.
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#44Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#45Please don't turn nice formats into a format that's similar to screenshots of text. Pandoc has an option to pack all images and styles needed to render the page into one html file: pandoc --self-contained input.html -o output.html
I use PDF's so I can send them to my iPad to read offline, highlight them, annotate them, and then send them back to my filesystem with highlights and annotations intact.
I sure can't do that with any "nice formats" like HTML or TXT or EPUB or MOBI.
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#46Please don't turn nice formats into a format that's similar to screenshots of text. Pandoc has an option to pack all images and styles needed to render the page into one html file: pandoc --self-contained input.html -o output.html
Being (not so easily) edited is often a feature, not a bug.
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#47Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#48Please don't turn nice formats into a format that's similar to screenshots of text. Pandoc has an option to pack all images and styles needed to render the page into one html file: pandoc --self-contained input.html -o output.html
Or, please do? I use PDF's so I can send them to my iPad to read offline, highlight them, annotate them, and then send them back to my filesystem with highlights and annotations intact. I sure can't do that with any "nice formats" like HTML or TXT or EPUB or MOBI.
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#49Earlier quoted context omitted.
Merge what?
I assume combining 2+ documents. For example, attaching a cover page with document owner/version control/lifecycle information to an existing PDF.
One way is to install poppler-utils and use pdfunite. There are many other open-source packages you can use as well.
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#50Earlier quoted context omitted.
Or, please do? I use PDF's so I can send them to my iPad to read offline, highlight them, annotate them, and then send them back to my filesystem with highlights and annotations intact. I sure can't do that with any "nice formats" like HTML or TXT or EPUB or MOBI.
You could, though. What you are describing are features of an editor, not a file format. I can imagine a browser addon performing the same tasks.