Live data from Hacker News

Preview in macOS Big Sur is destroying PDFs

annoying.technology

221–230 of 326 posts

Re: Preview in macOS Big Sur is destroying PDFs

#221
post #196

Earlier quoted context omitted.

Are there any other "fixed" or "docker-like" formats for documents besides PDFs that solves a lot of problems with PDF format? From what I understand, PDF is an xml based document standard.

Are web pages/archives really less fixed than PDFs if you don‘t want want them to be? I mean I know they are in practice, but I don‘t see why you couldn‘t use them as a fixed document format. Some contracts may need to be upheld between creator and consumer. If the consumer doesn‘t want to, well, that‘s freedom, isn’t it? Of course it is the most code executing document format to ever execute code, so if that was the…

Yea, you can use `position: fixed` or `position: absolute` with CSS + HTML but as you said, it doesn't dictate pages. Although, now that I think about it, why do we need pages :) Just fixed layout is good enough.

Re: Preview in macOS Big Sur is destroying PDFs

#222

Earlier quoted context omitted.

> PDF is one of the strangest file formats I've worked with. Do you by chance have a "definitely strangest" file formats? Just curious if something out there is vastly weirder, or more perplexing, than PDFs?

I haven't worked with it myself but I heard Photoshop's PSD format is a good candidate.

https://github.com/gco/xee/blob/4fa3a6d609dd72b8493e52a68f31...:

“At this point, I'd like to take a moment to speak to you about the Adobe PSD format. PSD is not a good format. PSD is not even a bad format. Calling it such would be an insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format.”

(Followed by the real rant)

I’m not sure it’s worse than PDF, though. PDF started life as a text-based postscript replacement that made it possible to index into postscript files, allowing one, for example, to render page 214 of a file without rendering the previous 213.

When files grew too large, they added compression. Initially, that was base-85 (https://en.wikipedia.org/wiki/Ascii85), keeping the file text-based, but other compressors were added so that, now, the file is binary. They kept the index and all metadata in uncompressed ascii, though.

Then, they layered zillions of different features (3D graphics, forms, JavaScript, font embedding, etc) on top of it.

Re: Preview in macOS Big Sur is destroying PDFs

#223
I hate Preview's PDF editing features, I wish there was a way to turn them off.

I'm the kind of person who tends to randomly click on things as I read them. In other PDF readers, this is quite harmless. In Preview, it starts editing the PDF. 99.9% of the time I have zero interest in editing or annotating the PDF I am reading. And then when I quit it asks me if I want to save a copy. I never wanted to change it to begin with!

(Maybe it is time I found another PDF reader...)

Re: Preview in macOS Big Sur is destroying PDFs

#224
post #137

Earlier quoted context omitted.

PDF is not a stack machine. This is a common misconception. PostScript was a stack machine with included operators which implemented a set of vector graphics commands. PDF has a similar rendering pipeline, but it renders a set of primitives described directly in the document -- there is no virtual machine involved.

My understating is that PDF still has a stack machine. Just one that is much simpler. Having said that, PDF is vastly more complex than it was originally. It can contain forms, JavaScript, audio, video, accessibility metadata, etc. It’s an extremely complex format.

Yes, but it's easy to generate a valid pdf. You just include the features you need and ignore the rest. It's really hard to transform an arbitrary pdf because you need to handle all the features.

Without further information this is more likely to be an Apple bug because they are doing the harder job.

Re: Preview in macOS Big Sur is destroying PDFs

#225

Earlier quoted context omitted.

> PDF is one of the best things IMO - it's like a docker container for documents. The way the original authors intended it to be, including fonts and all the things that go into making a document. Sounds like you want the PDF/A standard for archiving: https://en.wikipedia.org/wiki/PDF/A It forbids embedding audio and video and JavaScript, requires embedding all the fonts, forbids encryption and patent-encumbered comp…

That PDF/A URL surprised me. Curiously, Wikipedia doesn't think it's a page or a subpage. https://en.wikipedia.org/wiki/Special:PrefixIndex/Wikipedia:...

I think the reason it's not appearing there is because you're looking in the "Wikipedia:" namespace, which is actually used for meta pages, not articles (e.g: https://en.wikipedia.org/wiki/Wikipedia:FAQ).

Searching under the Article namespace (which contains the actual contents of the encyclopedia), it is included: https://en.wikipedia.org/wiki/Special:PrefixIndex/PDF

Re: Preview in macOS Big Sur is destroying PDFs

#226
post #156
post #134

I have learned to be scared of my MacBook. Seemingly safe behavior can cause permanent damage. It does completely unexpected things, apparently by design. I do not put my pictures in the ~/Pictures directory for fear of what the newest app will do to “improve” them for me. I fully expect it to apply lossy compression to my files without asking. This is after Photos or whatever it was called at the time mangled the da…

I have run into that Messages fat-finger-delete multiple times, it is infuriating! I still don't know what the key combination is, but IIRC the confirmation defaults to "Delete" when enter or space are pressed, which are...quite common when sending short messages.

After my latest iCloud password change Messages has also been giving me the beachball of doom when images are received. I'm terrified of what that implies. I'm looking forward to the announcement of the exploit where a carefully crafted image owns MacBooks.

Re: Preview in macOS Big Sur is destroying PDFs

#227

Earlier quoted context omitted.

> PDF is one of the best things IMO - it's like a docker container for documents. The way the original authors intended it to be, including fonts and all the things that go into making a document. Sounds like you want the PDF/A standard for archiving: https://en.wikipedia.org/wiki/PDF/A It forbids embedding audio and video and JavaScript, requires embedding all the fonts, forbids encryption and patent-encumbered comp…

That PDF/A URL surprised me. Curiously, Wikipedia doesn't think it's a page or a subpage. https://en.wikipedia.org/wiki/Special:PrefixIndex/Wikipedia:...

Wikipedia has subpages disabled in the main article namespace, which makes slashes in article names possible.

https://en.wikipedia.org/wiki/WP:TITLESLASH

Re: Preview in macOS Big Sur is destroying PDFs

#229
post #21

Why anyone treats PDF as anything but a write-once format is beyond me. It's so finicky that I'm not shocked bugs like this happen. The only programs I'd be reasonable sure wouldn't screw it up are Acrobat itself, and pdflatex and friends. I think we need a multi-image container format. It could be something that's literally a bunch of jpgs/pngs/pick your poison in a tar container, and given a new extension. OSes wou…

> Why anyone treats PDF as anything but a write-once format is beyond me.

Because PDF is supposed to be like electronic paper and you normally can draw on a paper original.

In an ideal world OSes and apps would be better equipped to separate data and metadata and work with multi-stream files. Every file would have different kinds of pure data (e.g. scanned picture and OCRed text), metadata (e.g. title, author, ISBN/etc IDs, ToC etc) and user-generated annotations in separate streams. But our actual world is not ideal, we mix everything into one stream for every document and allow the apps modify it every time we view it.

Re: Preview in macOS Big Sur is destroying PDFs

#230
post #201

Earlier quoted context omitted.

Generally the PDF copy of a book is designed to fit the format of the final printed book. The PDF is even often the deliverable sent to press. If you are using something like an e-reader, or a smartphone, the PDF layout often doesn't translate well. Typesetting is also normally also done for ePub/Mobi, but the layout is tailored to the format of the device that the document will be read on. Although there are times w…

I do believe this happens, but I have yet to read a book that looks even reasonably typeset on Apple Books on a phone with anything larger than default. I know a PDF can‘t do that either, but that‘s the promise of these formats right? Between the most typography focused tech company and whatever the publisher puts into the file, they don‘t deliver.

There are two issues here:

1. PDFs are fully baked/static and made for one page format (the one original book was printed on). These will never work.

2. Ebook formats are basically webpages and they have CSS. There are defaults from the ebook reader app and but often there are css settings from the publisher of the book. Their css styles mash together leading quite often to bad results. They could be very responsive but i suspect publishers test only on Kindle/ebook readers.

I am not sure why they just don't make one "master" style thats tested everywhere. But it's probably because they are not software companies. For them epub/mobi just might mean "black and white ebook release".

Also mobi is probably most of the sales and it is pretty restricted design wise compared to epub.

So basically blame the publishers.

Post reply on HN