Live data from Hacker News

Preview in macOS Big Sur is destroying PDFs

annoying.technology

241–250 of 326 posts

Re: Preview in macOS Big Sur is destroying PDFs

#241
post #232

There was something in macos Catalina that broke mupdf on my macbook pro. The view would occupy the lower left corner of the window, and something was clipping the view to the lower quadrant. I tried installing from source, changing the gl library etc. But it was the same. Am done with Apple for now. M1 is a bit tempting, but I guess I will wait for the technology to mature, buy a Macbook Air, and run Linux on it.

Why would installing from source change things. Without finding/fixing the bug, you're just using the same compiled code as before

Re: Preview in macOS Big Sur is destroying PDFs

#242
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.

In my very humble opinion, it's accurate: "Saving a PDF with Preview in Big Sur [Preview in Big Sur] can corrupt OCR text added by a third-party program [is irreversibly destroying PDFs]" I understand the (fairly common, in these comments) viewpoint that this is the fault of the "third-party program", but since the PDF is readable up until Preview touches it...I find it hard to come around to the viewpoint the third-…

Maybe this can give you some insight. I downvoted your comment simply because it didn't add anything to the discussion and you made an assumption that has several faults in it.

For one, your "mental model" is off because you assume that the first part of "readable bytes" is accurate. Without actually seeing the PDF in question, you don't know if the "readable bytes" are actually corrupted and Preview is fixing them to make them readable. That would mean that Preview is actually correct in its behavior and the source document is what's flawed.

On the tail end of your mental model, then, is another assumption which is that this results in "unreadable bytes" but that's not accurate either. The PDF that results from a save in Preview may be accurate to the PDF specification and is perfectly readable as a PDF in any PDF application/reader. What's no longer readable is the extra content that was originally in the file that may not have been saved correctly, in-spec, or may have been corrupt to begin with.

A big hint as to what's going on here, now that I've had some time to review this, is that the "corruption" happens consistently - the letter "a" is always replaced by the same "corrupted" character, the letter "b" seems to be consistently replaced with the same character, etc. That points, in my opinion, to a lookup that's no longer correct. What side of that lookup is bad is hard to say without seeing the file in question.

Re: Preview in macOS Big Sur is destroying PDFs

#243

I work with a ton of PDF's between my Mac and iPad, and it mostly works but there are still just way too many bugs. It's a lot of little things, like in Catalina where opening up the sidebar for annotations (comments) seemingly randomized their order. (Big Sur, fortunately, fixed it to be page-order again.) Or how printing a PDF from a website (in Catalina, also seemingly fixed in Big Sur) would look right on the pag…

> 10% of the glyphs were scrambled ("lik3 thZs"), like some sort of character table corruption. As I understand it, that's a form copy protection trying to prevent exactly what you're doing.

Try to screenshot with a movie onscreen.

You get a grey rectangle.

Re: Preview in macOS Big Sur is destroying PDFs

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

What annoys me is that there are some .pdf manuals I want to refer to, and when I view them in preview and go to quit it asks if I want to keep my changes or revert them.

WTF? why does viewing a manual - and I only used navigation like page up / page down - cause modifications?

Re: Preview in macOS Big Sur is destroying PDFs

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

> 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

You've just described the .cbt format!

https://en.m.wikipedia.org/wiki/Comic_book_archive

Re: Preview in macOS Big Sur is destroying PDFs

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

[deleted]

Re: Preview in macOS Big Sur is destroying PDFs

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

The more I learn about macs the more I think the "it just works" crowd really mean "I will sacrifice my system "working" sometimes in exchange for having zero configuration options".

Re: Preview in macOS Big Sur is destroying PDFs

#248
post #137

Earlier quoted context omitted.

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.

One point: Transforming an already incorrect file into a correct one is the hardest job of all.

Plus some further information:

ABBY has had months to support Big Sur but still haven’t.

That makes it seem like they either don’t care about supporting MacOS users, or they have a very low engineering budget.

Either way, that makes it seem more likely to me that they have a bug, than Apple.

But, regardless of the balance of probabilities, the point is that the original piece blames Apple entirely.

And yet nobody here really seems to dispute the idea that ABBY, a professional PDF generator could be producing a buggy file.

Re: Preview in macOS Big Sur is destroying PDFs

#249
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.

I've been looking for a FOSS desktop agnostic universal file previewer or thumbnail generator for a while now; if anybody has suggestions I'd love to hear them. Ffmpegthumbnailer for video thumbnails or imagemagick for image thumbnails are fine, but what about previews for things like ebooks or PDFs? Something that provides a one-stop-shop for as many common filetypes as possible is what I'm looking for. My current s…

> but what about previews for things like ebooks or PDFs

MuPDF is a great FOSS application and my go-to PDF reader. It lacks fancy annotation, and doesn't even have great text selection and copy/paste, but it is really fast, and has fast search, manipulation, etc.

https://mupdf.com/

Re: Preview in macOS Big Sur is destroying PDFs

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

Oppositely what I absolutely WANT - is web page like format with auto-flowing text and something that fits to the screen with user styling/typesetting. I wish both option is available.
Post reply on HN