News for hackers. Stuff that matters.
Re:Show HN: SingleFile is finally available on Safari (macOS... by testfrequency on Thursday November 17, 2022 @02:22PM (#33644190)
Can someone make a practical reason for saving an entire webpage locally vs a PDF export in 2022?
Re:Show HN: SingleFile is finally available on Safari (macOS... by joemi on Thursday November 17, 2022 @02:42PM (#33644488)
I'd say the difference is similar to source code vs. compiled-binary-for-a-single-target. The webpage is the source code and can be rendered for various targets if it's responsive. The PDF is just how it looks on a single target, and does not include how it behaves (animations, video, hover effects, etc). So both have benefits.
Re:Show HN: SingleFile is finally available on Safari (macOS... by gildas on Thursday November 17, 2022 @02:24PM (#33644227)
SingleFile only "compiles" the resources (stylesheets, images, fonts etc.) into an HTML file. You can always transform this HTML file into a PDF afterwards. You will get the same or even better result thanks to the prior transformation.
Re:Show HN: SingleFile is finally available on Safari (macOS... by maliker on Thursday November 17, 2022 @02:56PM (#33644694)
I use SingleFile occasionally for saving and sharing interactive pages. E.g. ones with zoomable charts. Works great.
Re:Show HN: SingleFile is finally available on Safari (macOS... by pvg on Thursday November 17, 2022 @03:09PM (#33644903)
The reason is the same in 2022 as it's always been and will remain - PDF is a lossy conversion - you throw away big piles of structure and metadata, often actual text, code, image resolution. Fidelity often matters a lot to digital packrats.
Re:Show HN: SingleFile is finally available on Safari (macOS... by Sidnicious on Thursday November 17, 2022 @03:10PM (#33644909)
A PDF doesn’t represent a responsive/resizable version of the page so it will look awkward on most screen sizes even if the original would have handled it.

A PDF doesn’t capture scrolling behavior, so a nested scrolling element will lose most of its content, and a page with a chat prompt or cookie notice might have part of its content covered.

A PDF won’t capture even simple interactive elements like image carousels, lightboxes, and collapsible sections, so content may be lost (“oops, I saved it on the second slide of the image carousel, but I really wanted the first one”).

As far as I know, a PDF won’t include embedded audio/video.

Many PDF exporters chunk the document into paper-sized pages (but, to be fair, some don’t).

Not sure if this tool nails all of those cases, but those are reasons why I’ve saved local copies of pages in the past.