Earlier 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.
PDF is literally digital paper. HTML has logical structure, it can adapt to different displays, etc. Sometimes you want one, sometimes, the other.
Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
131–140 of 170 posts
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#132Print it? Archivize it? Send it via email? Read it on another device (which)?
Depending on that, there are different solutions and trade-offs. For example on how to deal with pagination.
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#133Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#134A reverse of this question; what is the best way to convert pdf to html? We are required by accessibility law to make our PDFs WCAG compliant however it would be easier to convert these to HTML.
I am currently writing a WASM-ready PDF toolkit that can handle both HTML to PDF and then rendering PDF pages to SVG. However, it's not yet production-ready.
The underlying HTML engine is currently a severe "work in progress", but it gives me the low-level access that I need: https://azul.rs/reftest
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#135Please 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
--embed-resources --standalone.
https://github.com/rstudio/rmarkdown/issues/2382https://pandoc.org/MANUAL.html#:~:text=Deprecated%20synonym%...
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#136Not related to the thread, but if anyone is looking to hire a developer or knows of opportunities, I was recently let go and am actively searching. Any leads or feedback would be greatly appreciated.
Sample PDF: https://drive.google.com/file/d/1n7M1TKOptSsYiibrbvV_Yojx53T...
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#137Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#138Earlier quoted context omitted.
PDF is literally digital paper. HTML has logical structure, it can adapt to different displays, etc. Sometimes you want one, sometimes, the other.
>Sometimes you want one, sometimes, the other. This is the part that the top commenter missed. Instead they decided that one format is "nice" and the other, by implication, isn't. I find PDFs a lot easier to keep organized en masse, I like that I can use them on any of my devices and it's easy for me to use them when I'm doing in-depth reading such as an ebook. Doubly so because my ereader also does text to speech an…
- A text to speech engine should work better with the original html structure where it sees bold tags, headings, and full sentences ra-
ther than broken-off ones
- Keeping PDFs organised, how would that differ from keeping any other filetype organised? I don't understand what difference you, "by implication", attribute to a file ending in .html or .pdf for being able to handle them en masse. If anything, searching across them will be vastly easier for software (self-written or third-party) and more reliable because it's all plain text
- Text and audio rendering syncing, I have no experience with but that doesn't sound like it ought to fundamentally work for a display format and not for the source text format. Of course, the software has to have support for this format (and otherwise it's trivial to pdfify a html but vice versa is nearly impossible)
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#139Please 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
Fyi... the preferred new syntax since 2022 is: --embed-resources --standalone. https://github.com/rstudio/rmarkdown/issues/2382 https://pandoc.org/MANUAL.html#:~:text=Deprecated%20synonym%...
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#140Earlier quoted context omitted.
PDF is literally digital paper. HTML has logical structure, it can adapt to different displays, etc. Sometimes you want one, sometimes, the other.
When do want the digital paper when you can have the more flexible one?
Each one has things the other can't do. Neither is universally more flexible.