Live data from Hacker News

Preview in macOS Big Sur is destroying PDFs

annoying.technology

131–140 of 326 posts

Re: Preview in macOS Big Sur is destroying PDFs

#131
post #56

Earlier quoted context omitted.

> It really isn’t Apple’s fault if someone else is producing bad files that they happened to previously tolerate, especially if that somebody isn’t maintaining their software. I think it is. Preview used to correctly handle the thing, and now it doesn't. Users cannot be expected to inspect the raw PS code of their PDFs to determine standards compliance. What they can do is assume that something that works yesterday,…

Yes, it is in principle possible that Apple was doing something special to support bad PDFs produced by ABBY which they then removed. If this is what happened, I would agree with you. But, there is no evidence yet that they removed anything. It’s quite possible (I’d say likely) that ABBY’s PDFs were corrupt all along. Preview may have tolerated them not because of a special feature which was then removed, but because…

The trouble is the PDF specification is vague and ambiguous in a number of areas. This has resulted in a lot of ill formed documents. If you are going to write a PDF reader then you are going to have to accept those documents and not corrupt them.

Even if ABBY does have a bug and fixes it then people will still have a bunch of older documents they will want to read.

Re: Preview in macOS Big Sur is destroying PDFs

#132
post #89

Earlier quoted context omitted.

It’s not brilliant. It’s just correct if ABBYY is producing corrupt PDFs, which is a possible cause of this problem.

If "Corrupt" = works fine until you make an edit and save using Preview, yes. You're 100% correct.

Works fine until you make an edit really doesn’t mean anything at all. PDF is much more complex than just a static image.

Re: Preview in macOS Big Sur is destroying PDFs

#133
post #23

This is a clickbait, sensationalist headline. “Saving a PDF with Preview in Big Sur can corrupt OCR text added by a third-party program” is more accurate.

That's fair, and I honestly didn't enjoy posting the headline here, but as far as I know I have to use the original title? And the original title is from a personal blog where we talk about annoying things. We're not a professional tech blog, or a bug tracker, or… something other than our own little thing. I choose that headline not to be clickbait, but "sensationalist" is probably true because I'm personally really, really angry about this issue. I wanted to do my usual "scan all my documents for the month" routine 30 minutes before going to bed, and instead it turned into a two hour debugging session. And I can't even use my normal workflow now, possibly until March. I find it completely unacceptable that Apple would break Preview that way again. It's not even the first time. Just thinking about it now gets me going again. That's why the headline sounds like it sounds. I would have no problem at all if it was modified here, and as I said – your assessment is absolutely fair.

Re: Preview in macOS Big Sur is destroying PDFs

#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 dates on a bunch of my vacation photos to 10 years before the actual trip.

Oh and have fun when your photos are automatically uploaded to iCloud to save space locally then silently deleted from iCloud to... save space? My sister lost her first year of baby pictures to that one.

Same with ~/Music after iTunes wiped out a bunch of carefully curated metadata. Yes, I did want that album art.

I fat-fingered some key combination in Messages recently and got a prompt confirming I wanted to delete the entire conversation history. I consider myself lucky it bothered to ask.

I can add “view a PDF” to the list of things likely to leave me holding the bag.

Re: Preview in macOS Big Sur is destroying PDFs

#135
post #11

Preview seems like a good example of something that's worth open sourcing. Not only will people end up doing work for you, you get eyes on the code and more direct issue tracking. Consumers get a product and they still have to go on Mac to use it.

For what it's worth, Preview is a relatively thin shell around Apple's own PDFKit: https://developer.apple.com/documentation/pdfkit Whether that could itself be open-sourced is an interesting question. (My concern would be that parts of it might be covered by Adobe NDAs.)

My understanding is that it is Apple’s own code, they didn’t license it from Adobe.

Re: Preview in macOS Big Sur is destroying PDFs

#136
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…

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. For example, I personally like to purchase books that are in PDF format, not epub/mobi. I want to rely on professional typesetting from the publishers, not some front-end engineer's vision of what the ebook should look like a…

> I personally like to purchase books that are in PDF format, not epub/mobi

PDF is abysmal for books though. 1) You can't scale fonts to fit various screen sizes. 2) It's waaay more expensive to interpret and render, so it affects battery life.

Re: Preview in macOS Big Sur is destroying PDFs

#137
post #78

Earlier quoted context omitted.

PDF’s are essentially a stack machine based program. It’s not clear what’s causing the problem, but verifying correctness of programs is not a solved computer science problem.

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.

Re: Preview in macOS Big Sur is destroying PDFs

#139

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. For example, I personally like to purchase books that are in PDF format, not epub/mobi. I want to rely on professional typesetting from the publishers, not some front-end engineer's vision of what the ebook should look like a…

> I personally like to purchase books that are in PDF format, not epub/mobi PDF is abysmal for books though. 1) You can't scale fonts to fit various screen sizes. 2) It's waaay more expensive to interpret and render, so it affects battery life.

And yet, I prefer it. Textbooks in any other format are miserable to read.

Re: Preview in macOS Big Sur is destroying PDFs

#140

PDFs are not intended to be modified. Preview and other readers use hacks to do the work. In general don't modify the PDF and if you really want to do it buy Acrobat reader.

The PDF file format has a mechanism in it for modifying documents.
Post reply on HN