3 ms·
>It's also why PDF lives. PDF lives because it's ubiquitous and stable, despite really rough tooling. If you don't have Acrobat it's a bit of a nightmare to wo
by jml7c5 7y ago
>It's also why PDF lives.
PDF lives because it's ubiquitous and stable, despite really rough tooling. If you don't have Acrobat it's a bit of a nightmare to work with, simply because it's so opaque. Yes, you can decompress a PDF to text and look through it by hand, but you need to learn the syntax and know how to use an extensible text editor with the write add-ons; this isn't something your average person in an office will know how to do.
The lack of discoverability is evidenced by the number of posts on Stackexchange etc. that answer "how do I losslessly recompress a PDF?" by giving a command that actually performs lossy downsampling. Or the accidental inclusion of secret layers underneath what were supposed to be blackout redactions. Personally, it took me ages to figure out how to losslessly recompress a monochrome image using JBIG2, which provided an enormous space savings and should have been much easier with some tree-based GUI explorer.
I'm hoping that one day we'll get a good, stable, powerful, reflowable PDF-like format. HTML+CSS+JavaScript works, but it's a huge standard, rendering is not exact, performance (in terms of memory usage in particular) isn't great, it's best created by hand (requiring programming and/or technical knowledge), and it's not really self-contained or sandboxed from network access.
- jl6 7y agoTo this excellent defence of PDF I would like to add that it works perfectly well offline and, crucially, is just a plain old file that can be emailed, WhatsApp’d, backed up, etc. without anyone’s permission or any ongoing dependency on centrally managed servers. My next website project will be published in PDF, not HTML.
- qu4z-2 7y agoHTML also works perfectly well offline, though, if you don't reference online assets. And if your objection is that it can run JavaScript and make web requests, then I have some bad news for you about PDFs.
- acqq 7y ago> Personally, it took me ages to figure out how to losslessly recompress a monochrome image using JBIG2, which provided an enormous space savings and should have been much easier with some tree-based GUI explorer. Can you write more about that? And what was the initial format of a monochrome image in the PDF, and why wasn't it JBIG2?
- jml7c5 7y agoI can't recall exactly what steps I went through. It took quite a lot of time. It was one of those rabbit holes where I spend two hours thinking I'm just 10 minutes from being done. If I recall correctly, I did the conversion in hopes of getting my aged Chromebook and phone to load the PDF more quickly; scrolling and page turns were just choppy and slow enough to be an annoyance. As to the conversion itself: I think every page was just an image (which was fortunate, as I'm not sure how I would do this otherwise) so I extracted all the images with something like mutool, converted them using jbig2enc after figuring out the flags to use to ensure lossless compression, then use some tool (ghostscript? imagemagick? some dedicated image-to-pdf program?) to smush it all back together. So the flow was original.pdf -> [page1.png, page2.png, ...] -> [page1.jb2, page2.jb2, ...] -> new.pdf I can't recall the original format of the images. Obviously it was something less efficient, but it was lossless. Presumably the images were compressed using the less efficient scheme because whoever scanned the pages didn't know they could twiddle some knob on whatever scanner or scanning software they were using. Or there was no knob for them to twiddle.