Live data from Hacker News

Preview in macOS Big Sur is destroying PDFs

annoying.technology

291–300 of 326 posts

Re: Preview in macOS Big Sur is destroying PDFs

#291

From what I can tell, there is no reason you can't just run the PDF through ABBYY FineReader again and get the exact same OCR you got the first time, so I think "irreversible" is a bit over-the-top. Is it as easy as CMD+Z? No. Is it data you can never get back? Also no.

In theory that is probably true – in my actual scenario I can't run them through ABBYY again because of the limitations of the bundled version. It only accepts PDFs coming from the scanner software, so running these through ABBYY again would give me an error message. I'd have to buy the full version to be able to try out that workaround.

On a totally not entirely unrelated note, I have found ExifTool[0] to be quite useful for many tasks. Especially in combination with a bash alias or simple Automator action, to be used in the services menu, or as a droplet or folder action. [0]https://exiftool.org/TagNames/PDF.html

Re: Preview in macOS Big Sur is destroying PDFs

#292
post #177

Earlier quoted context omitted.

Basic PDF editing (adding, removing, reordering, cropping and rotating) has been rock solid in Apple's Preview app. It's something that I dearly miss when I'm on Windows. Which makes showstopper bugs like this a very unfortunate. But then again, it's been common knowledge that you shouldn't upgrade to a .0 release...

I'm not sure how widely you've sampled the field on Windows, but in case you don't know it, I can recommend PDF-Xchange Editor. They forced it upon us at my workplace and it seemed dodgy as hell at first. But I've been using it steadily and now I really like it. I'm a paper-free researcher so I no longer print research papers. Instead, I annotate/highlight/comment using this software, and it's worked so well that I'v…

Thanks for the hint, I'll check it out!

Re: Preview in macOS Big Sur is destroying PDFs

#293

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…

We now have JavaScript in PDFs?..

Oh how I envy your ignorance... :)

Jokes aside, yes, we certainly do, and it is every bit is horrible as you might imagine and then some. I've seen people basically re-create spreadsheets in it, with the not entirely unexpected effect of updating the values taking up to 20 seconds.

Re: Preview in macOS Big Sur is destroying PDFs

#294
post #79

I find posts like this completely pointless when they include no details at all. This is just "there's an incompatibility between third-party software and a version of macOS that the third-party software says they don't support yet, so I'm going to publicly criticize Apple". If you're not going to do the work to figure out what the corruption is, at least include the two PDFs so other people can look at them and see…

There’s a list of blog posts about the same problem linked in the article including a radar from 2016 ( https://openradar.appspot.com/29786282 ) on Apple’s bug tracker. It’s not exactly an obscure bug that nobody knows how to reproduce.

A radar from 2016 is not useful, that describes an old bug. Just because the symptoms look like something we’ve seen before doesn’t mean it’s the same underlying issue.

Re: Preview in macOS Big Sur is destroying PDFs

#295

Earlier quoted context omitted.

> 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

And it's a bad format, because .tar does not have an index that allows random access. It also does not have compression, unless you stick it in gzip, which makes it even worse because then you can't even skip entries, you have to decompress the whole thing from the top. .zip is better, at least that has an index, but at the end of the file, so it's not linearly streamable. For what it's worth, .pdf is structurally ~t…

Most comics using this meta-format seem to use .cbr (Rar) or .cbz (Zip). The main benefit is that reader software understands the intended use of these archives, and you can link a comic book reader to these file extensions.

Re: Preview in macOS Big Sur is destroying PDFs

#296
post #190
post #85

My guess is that the output PDF is still valid, but that an embedded (subset) font has had its `ToUnicode` map stripped, so that there's no link between the character codes used in the text elements and the "actual" characters they represent (there are also other ways this corruption could happen, but dropping or mangling the `ToUnicode` map seems like a likely cause).

I agree. If you look closely, you can see certain patterns repeating, they’re just not English letters. But it definitely looks like natural language, and not random binary dump.

Also look at the spaces. The length of the words is the same on both texts. So the content is still present just the characters got shifted.

Re: Preview in macOS Big Sur is destroying PDFs

#297

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.

> It's waaay more expensive to interpret and render, so it affects battery life.

Interesting – I never noticed a difference in battery life when I was reading MOBIs and PDFs on my Kindle, but the slow refresh rate made scrolling through PDFs a nightmare. I do notice that reading PDFs on my iPad is very light on battery compared to reading web pages, but that’s because those web pages are running a bunch of JavaScript and using my internet connection, whereas with a PDF I download it once and then read it for hours.

Re: Preview in macOS Big Sur is destroying PDFs

#298

Earlier quoted context omitted.

I never saw these screw-ups in Acrobat, so maybe the problem is not the format, but Apple?

Then you probably don't use Acrobat enough. PDF is a finicky mistress.

Maybe; but I do have the full suite. Have used it plenty during the pandemic to fill in forms digitally (some that were designed to be filled in digitally, others that were not), both on an iPad and on computers. Sure, I'm not a hardcore professional user but those wouldn't be using Preview anyway; I'd bet my family usage is consistently above average.

(also used it before the pandemic - I used to work for Adobe, for 10 years, though not in the Document Cloud group).

[edit] I should clarify that "I never personally experienced Acrobat bugs that would corrupt my document", not that they don't exist; am not claiming that Acrobat is flawless, and maybe if I went to dig into the bug tracker I could've found document corruption bugs too, who knows.

The format is certainly messy [+], I don't deny that. However, I think in this instance you're letting Apple off the hook too easily - this one is decidedly their screwup, not Adobe's.

[+] not the basics of it, that's fine; but the "trying to do too much" part.

Re: Preview in macOS Big Sur is destroying PDFs

#299

Earlier quoted context omitted.

Very old LaTeX PDFs tend to have this issue too. Chances are pretty slim for profs to edit PDFs witb Preview, I think…

Yep, and in that case it's because those PDFs were often generated through really horrifying pipelines (e.g. TeX to DVI to PS to PDF). Under some workflows, the resulting document wouldn't even contain any characters, as far as PDF was concerned -- it'd just be a bunch of vectors.

Or not even vectors, but lots of little bitmaps. It's really awful.

Re: Preview in macOS Big Sur is destroying PDFs

#300

Earlier quoted context omitted.

I personally use an iPad. It's amazing for it. Especially when you use the Apple Pencil to highlight text, make annotations like circles or question marks, etc.

I struggled to find good software for this. Is there a specific app you recommend?

I like GoodReader for this. It’s the only app I’ve found that stores my annotations in the PDF files themselves, and allows me to keep my PDF library in sync over SFTP, Dropbox, etc. so that I can read and annotate documents on non-Apple devices as well.
Post reply on HN