38 ms·
Preview in macOS Big Sur is destroying PDFs
- zepto 6y agoThey are using software unsupported by the vendor and blaming Apple for the outcome. “ABBYY says they don’t support Big Sur yet, that’s fine. But Apple didn’t tell me that I can’t upgrade to Big Sur when I use ABBYY. I’d be a lot less angry if there was a changelog or release notes from Apple where it says there is a known problem with OCR’ed PDFs in Preview. Their software is broken, they need to tell me. I don’t care if it only worked because they had workarounds for super shitty PDFs that ABBYY possibly produces, I just need my OS to keep working for me.”
- AlexandrB 6y agoWould be interesting to see if Preview is stripping OCRd text from PDFs not created by ABBYY FineReader.
- matrixagent 6y agoRead it again. This bug could hit you without ever using ABBYY yourself. Apple broke Preview.
- r00fus 6y agoSo is there an active Preview corruption example that doesn't involve ABBYY? I've used FineReader before for a commercial effort, I do remember it being very finicky.
- apocalyptic0n3 6y agoIt's unrelated to OCR, but there have been other Preview issues. We ran into an issue a few years ago where saving a PDF with forms in Preview would set some style setting so that in most other readers, the form fields would have no background color and use white text, making them unreadable. They were still perfectly readable in Preview, but had the style issues in Chrome, Firefox, Acrobat (and Reader), and Foxit. We have a project where we programatically fill in PDF forms using PDFtk and one day, our editor just starting spitting out empty PDFs. After troubleshooting, we traced it back to the style changes Preview was making after another dev had accidentally done a CMD+S on the template file and committed the template. In short: NEVER save a PDF with Preview. You should probably just avoid opening it in Preview period, frankly.
- matrixagent 6y agoI personally don't use anything else, but when the problem first occured a few years ago, it was not limited to PDFs from ABBYY. (Which is not to say that it's purely Preview.app's fault. Maybe all of these PDFs were created in a bad way, would not surprise me at all. Could very well be that Preview.app is actually "improving" and fixing old bugs/cruft, breaking things that worked before but never should have in the first place. As the end user that doesn't really matter for me though, as I said in the post itself.)
- zepto 6y ago> Could very well be that Preview.app is actually "improving" and fixing old bugs/cruft, breaking things that worked before but never should have in the first place. Exactly this. So the question is, whose responsibility is it? Apple’s to magically support the intersection of all the broken sofware? You essentially have argued that ABBY is popular enough that Apple should have tested it. Maybe it is popular, but the implication is that Apple would need to regression test against all this popular PDF generating software for any change to the preview engine, since they wouldn’t be able to know for sure what software’s PDFs would be broken by conforming changes. What we know they did, was to make a copy of Big Sur available for ABBY to use to test their own software. That’s pretty standard practice in a case like this and is them behaving responsibly. If Preview really was at fault, ABBY could have raised the issue with Apple, and or put a warning in their own software. If it’s that popular, you’d think they would have an incentive to do this. What isn’t obvious is that Apple should somehow introduce workarounds every time a third party doesn’t fix a bug.
- zepto 6y agoI read it. It doesn’t show that Apple broke Preview. It says Preview stopped being compatible with PDF’s produced by ABBYY. Those PDFs could have been buggy all along, and only now be showing up due to improvements in preview. It’s possible that Apple broke preview, but having seen how poorly maintained ABBYY is, I wouldn’t be surprised if it was producing malformed PDFs that just happened to work on older version of preview.
- matrixagent 6y agoI honestly don't care who is exactly at fault. I definitely blame Apple for destroying the PDF. There might be plenty of blame left for ABBYY for creating a bad PDF in the first place. That does not change how utterly unacceptable Preview.app's behavior here is. If you honestly think there is no valid criticism for Apple here, I don't know what to tell you. In any case, the whole thing is annoying technology – and seeing some of the comments here, people should more often try to step out of their own mind bubble and try to look at these things form their grandparents' or similar perspective. I personally am very aware of plenty of ways to work around this issue. But Apple used to be the company you could use if you either are not or don't want to be concerned about things like that. And a quick edit: I really dislike people who discuss like you do – all of what I just wrote is already stated in the post itself. Another commenter even called you out for ignoring that part when quoting me. I should not have wasted five minutes spelling it out for you again, your mind won't be changed anyway.
- zepto 6y agoWith all due respect, if you had led with your “footnote”, you wouldn’t have even been able to write such an angry sounding piece. Also, you say that you don’t care who is at fault, but that isn’t how the piece came off. It’s odd you’d say that now. I quoted you because you hadn’t incorporated this key information into the main text. What I think is that there are many ill-formed PDFs out there and that supporting the intersection of all of them is essentially impossible. I also think that it’s every bit the responsibility of a company like ABBY to generate good PDFs. How can it not be? Relying on Preview to be forgiving when you are a maker of PDF generation software is obviously irresponsible. Why do you think ABBY didn’t announce that this problem existed when the Big Sur betas were available for them to test with? For what it’s worth, I stopped recommending Fujitsu scanners years ago. For a while I loved mine, but none of the software was well maintained.
- ehutch79 6y agobut the file was stuff generated with abbyy, even if you give it to someone else.
- masswerk 6y ago"Broke" may be a bit harsh. What appears to be happening is that Preview somehow loses or corrupts the toUnicode map, which is apparently located in the metadata, when saving the PDF. Mind that every application will have to reassemble/reflow the metadata when saving a reflowed document (like after cropping and/or discarding pages). To do so, the application has to interpret and to reassemble the metadata before wiriting it back. Now, some algorithms and routines may be more robust and allowing than others. Maybe, an innocent refactoring attempt just lost that critical bit of robustness, required to deal with that particular format produced by this particular application. For example, consider an XML-based format, where a particular application delivered a malformed document, like a missing closing quote for some attribute. Most XML interpreters will churn happily along with this, but, after a rewrite of some routine, an application just ignores the malformed tag with the runaway string. Did it break XML? Or did it just fail to interpret a malformed document, it had somehow been able to deal with thanks to some extra robustness present in the previous version? Considering this hypothetical case: Should that application be improved by an update to regain its previous robustness? Yes, absolutely. Is it a bug and is the vendor to blame? Probably not. Mind that this might be quite well what is happening here, as well.
- matrixagent 6y agoI think you might interpret the word more harshly than I intend it to be. Something that worked before Big Sur is not working in Big Sur. It's broken. That's all there is to it for me as an end user. Of course there is a difference in reasons for things breaking, and I'm not denying that Apple might have "improved" Preview.app when you judge it by how well it adheres to a PDF spec. But it still "broke" a very common and normal workflow by doing so, and I would at least expect them to acknowledge that. If they decide breaking this is worth it, that's absolutely fine with me. But I don't think they are even aware of it, and that is not something I'm willing accept from a company with the reach and resources of Apple.
- zepto 6y agoAre you happy to accept corrupt PDFs being generated by ABBYY, a company that does nothing but write software to produce PDFs and yet hasn’t even commented, let alone maintained their software? Do you think ABBYY is even aware if the issue? It seems like you expect Apple to test everyone else’s software, and make workarounds for their bugs. Regardless of Apple’s scale and resources, this is obivously unreasonable. Also you say: “That's all there is to it for me as an end user” as if you didn’t understand anything about the complexities of software development, but reading your comments on other topics, you are obviously skilled in the art. You are not ‘just an end user’ who doesn’t understand the complexities.
- deleted 6y ago[deleted]
- arvindamirtaa 6y agoHere's the rest of the statement that you left out that answers your point. "...I just need my OS to keep working for me. This bug could hit me without even owning a scanner at all – someone sending me a PDF that I then unknowingly break before archiving it. That’s the part I’m mad about."
- zepto 6y agoIt doesn’t really. Firstly, that’s not what they are mad about, since that hasn’t actually happened to them. They are mad that the pdf’s their scanner produces don’t work properly. And secondly, that hypothetical could well be using broken software too. We really don’t know how bad the PDF’s ABBY produces are, but as someone who owned this scanner and the software, it’s fairly obvious that the software is barely maintained. 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.
- arvindamirtaa 6y ago> "They are using software unsupported by the vendor and blaming Apple for the outcome." But by this logic, no software other than those that Apple sells you directly (their own or through the MAS) is "supported software". If Apple makes a change and all of them break rendering it useless of anyone using software not bought from them, would you still be making this same apology?
- zepto 6y agoNo this is not correct. ABBY hasn’t updated their software for Big Sur, i.e. ABBY themselves say it hasn’t been updated yet and is not supported by them on Big Sur. That’s what unsupported means. It has nothing to do with whether Apple supports it.
- arvindamirtaa 6y agoI receive that PDF file that looks like any other PDF file. I open it with preview. It opens fine. I close it and open it again. It opens fine. I open it a third time and make a small arrow pointing to something and save it (as I would with ANY OTHER PDF). It breaks. I'm not using ABBYY. I've never heard of it. It's not on my system. It's just a PDF file that I got sent. Now what?
- jcrawfordor 6y agoSo Preview opens a file, which is apparently valid per Preview (Preview handles and displays it correctly). After changes, preview then saves a file that is not valid per Preview (OCR text layer is corrupted). It is very difficult for me construe a situation in which this would not be considered errata in Preview. Even if ABBYY is writing unusual PDFs, it's popular enough software that this issue will be encountered in the real world multiple times. Having to deal with unusually formed PDFs is just a general trait of writing PDF software. If you consider it a non-issue that your software writes corrupt PDFs when the same situation is handled correctly by Acrobat, no matter how unjust you feel the cruel world to be, you should not be in the PDF business. There's a reason most PDF viewers only present a highly constrained feature set, and it's because writing a capable PDF editor is very difficult. Apple has decided they are up to the challenge, and in this case has failed. As a general rule, if your software package opens a file fine, then writes a broken version of it, seems to all the world like a bug in your software package. The idea that this behavior in a PDF reader can be excused because the software that generated the PDF was not approved for the operating system the viewer is running on per the vendor... kind of stretches credulity. I don't usually inquire as the OS used to generate the PDF when I receive one.
- zepto 6y ago“The idea that this behavior in a PDF reader can be excused because the software that generated the PDF was not approved for the operating system the viewer is running on per the vendor.” Nobody is saying that. The suggestion is that the software that generates the PDF produces corrupt documents. The fact that the vendor of that software doesn’t approve it for Big Sur suggests that they might be aware that there are problems.
- jcrawfordor 6y agoI worded it that way for two reasons, one of which is admittedly speculative: 1) It seems highly unlikely that ABBYY relies on some changed OS behavior in generating PDFs that leads to it producing PDFs that are malformed in such a way that is only revealed when they are rewritten by Preview. Behavior in Preview is by far a more likely cause of the problem. Generally the thing that changed is what broke... 2) To the user, this looks 100% like a problem in Preview no matter what's happening, and it's Apple's responsibility to not do this kind of thing to users. The PDF opens properly the first time, so de facto it is "valid" as determined by the product that later corrupts it. As I said, handling questionably valid PDFs is part and parcel of writing PDF software, and failure to handle a PDF that otherwise renders correctly looks like a bug on your part... especially when it otherwise renders correctly in your own software.
- db48x 6y agoAre you arguing that ABBYY Finereader is going to produce different PDF files once they support the new OS? Possibly they will, if only to work around this obvious bug in Preview.
- zepto 6y agoI’m arguing that yes, they will produce different PDF files. It’s not obvious the bug is in preview. The bug could easily be in in ABBYY’s PDF generation code. To be fair, I’m not arguing that this is the case. I’m arguing that it just as easily could be as there being a bug in Preview, which is also possible.
- db48x 6y agoIt's entirely obvious that the bug is in Preview.
- beamatronic 6y agoPreview should not change the file on disk. I would expect it to open the original file as read-only.
- blacksmith_tb 6y agoYes, the author says it's "the result after modifying (removed a blank page) and saving that same PDF in Preview." So it's not enough to just view the file in Preview.app I take it, but you need to save it out (which still shouldn't strip anything extra, obviously, but is not what I thought was being claimed).
- birdyrooster 6y agoSo you are saying that they overwrote their file and are upset that the file they overwrote is different from the new file? This is insanity. Clearly a bug in AABBY that it can’t read PDF saved in the standard spec. PDF is not a bitmap, it’s a script like HTML or JS. People understand browser incompatibility but some how this is unconscionable.
- fastball 6y agoOther possibility is that Apple isn't saving to spec. Or even more accurately, that neither are using the same spec because PDF just isn't that standardized.
- throwaway744678 6y agoI understand it does not: the issue occurs when the user removes another (blank) page, then saves the file.
- MrBuddyCasino 6y ago> In the lower half is the result after modifying (removed a blank page) and saving that same PDF in Preview. I don't think this means Preview changes the files just by opening them.
- anonuser123456 6y agoTime machine?
- dewey 6y agoBackups are always great, but if something is broken silently behind your back and you only realize in a few years that your archived documents are not searchable any more that makes it harder to recover.
- jordache 6y agoanyone else not able to see sufficient details the tiny screenshots? What was the difference?
- sp332 6y agoThe difference to look for is between the top half on the right vs the bottom half on the right. The text has been scrambled into random symbols. Here's a direct link to the 2,240x939 image: https://annoying.technology/media/previeweatingpdfs.png https://annoying.technology/media/previeweatingpdfs.png
- r00fus 6y agoThere is a more detailed image link in the doc.
- deleted 6y ago[deleted]
- mhh__ 6y agoPreview 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.
- arvindamirtaa 6y ago>Consumers get a product and they still have to go on Mac to use it. There will be ports to windows and linux in under a month.
- mhh__ 6y agoHow? I assume it's mostly using proprietary MacOS APIs, and, ignoring that it doesn't really matter beyond apple being an abusive partner, lawyers are a powerful tool (This software is under the Apple don't take the piss licence)
- arvindamirtaa 6y agoAssuming the License is that restrictive, only those who are financially invested in Preview working well (and only on macOS) will have any incentive to contribute code. I can't think of any company other than Apple that fit this description.
- mhh__ 6y agoApple fanboys, and also having the code be public puts pressure on you for it to be good.
- deleted 6y ago[deleted]
- yakubin 6y agoThere already is an equivalent feature in GNOME. Preview's code is of little value outside of Mac. It's also not rocket science, that the thing stopping other people from doing the same thing would be lack of access to original source code. :)
- xxpor 6y agoWhy 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 would open it and present it as a gallery in order. There's no value in a non-ocr'd PDF existing. For OCR'd text that gets more complicated, but it feels like we should be able to come up with a common denominator that doesn't have the legacy of a binary format derived from postscript in the early 90s.
- bigbubba 6y agoIn many industries, writable PDFs are commonplace and aren't seen to be a problem because people in those industries don't see any problem with using Acrobat. If you want to unseat Acrobat and PDF, I think you'll have to provide something that has equivalent or greater power. As for multi-image container formats, I think we already have that: cbz/cbr. Just a zip or rar archive with images in it, to be displayed in order by name. This 'format' is in common use already for scans of comic books. There are numerous viewers you can use to open and browse these files. Something to consider though; accessibility. A screen reader needs to use OCR to read these files to people with impaired vision. PDF files aren't fantastic for screen readers either, but they're much better than just a JPEG. I'd love to see some sort of subtitle system for images (I think mpv could probably overlay a subtitle sidecar on a still image, but that's not widely supported. Text-based subtitles formats are easy to wire into text to speech though.)
- avalys 6y agoThis 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.
- refulgentis 6y agoIn 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-party program is relevant. Readable bytes -> Preview -> unreadable bytes is my mental model so far. Edit: absolutely unacceptable this is downvoted to -4. I've observed for a couple months that participation in Apple-related threads, outside indignation that Apple was involved in the discussion at all, gets down to -5 before getting back to -1 a day or two later. No matter what tone is used, this happens, and it makes the problem even worse in the long run. Been here 10 years, always been a _slight_ problem, but over the last year, it's virtually impossible to participate without continuing to slowly destroy my 11 year old account. Not sure how much longer I can keep trying.
- birdyrooster 6y agoPreview isn’t breaking files by reading them, as I understand it, people are saving files with Preview and over-writing their ABBY compatible pdf. Just because the last four bytes of a file name is “.pdf” doesn’t mean anything that opens files with that suffix will work. PDF is not a bitmap, it’s a script like HTML or JS. People understand browser incompatibility but some how this is unconscionable.
- refulgentis 6y agoI see, the chain isn't as simple as bytes -> Preview -> unreadable bytes: rather, bytes -> Preview, edit -> unreadable bytes. Is that accurate?
- crazygringo 6y agoI 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 page... but if you copied and pasted the text from the PDF to somewhere else, something like 10% of the glyphs were scrambled ("lik3 thZs"), like some sort of character table corruption. Or reading a PDF with Books on my iPad, maybe 10% of the time bookmarking a page... doesn't bookmark it. Or removing a bookmark... doesn't remove it. Or a handful of highlights you just made have inexplicably disappeared the next time you open the file. Or whenever you open the PDF in Books it remembers which page you were on. Except sometimes it doesn't, so you can't really rely on that for saving your place. Or in Books, if you select some text to copy but accidentally hit the adjacent "select all" in the pop-up menu, and you're dealing with a 400-page PDF, it just locks up and you have to restart it. Or in Preview if you want to convert a PDF to black-and-white, there's an option for it but your PDF will balloon in filesize to 10x larger or something. I mean, I could go on and on. It's weird, because Preview is an incredible app, really. But it really is like they build it and then never bother to test if basic workflows reliably work.
- drevil-v2 6y agoThat not remembering the last page you were at in Books drives me crazy. My iPad would be the perfect device for reading PDF books especially technical and maths text books, if weren't for the Chinese torture of whether it will remember your page the next time you open it or will I have to scroll through until I recall where I left.
- Jtsummers 6y agoI've been a happy GoodReader user for years. Syncs with a variety of sources, remembers where I was, bookmarks work. Annotations work, but I don't use that much beyond being able to say it works.
- 6y ago
- nerpderp82 6y ago> You have to completely close the file and reopen it, only then will you realize that it has been destroyed.
- lisper 6y agoUsing Apple devices in general seems like a total crap shoot to me nowadays because of the impossibility of down-grading the OS. Every "upgrade" comes with a considerable risk that something that had been working will stop working, and if that happens, you are pretty much SOL.
- fastball 6y agoWhat? You can definitely downgrade to an earlier MacOS. It's not a one-click downgrade like the upgrade is, but I don't know of any OS with that feature.
- lisper 6y ago> You can definitely downgrade to an earlier MacOS. Sometimes you can, sometimes you can't. Going from Mavericks to Yosemite for example is one-way because it includes a non-backwards-compatible firmware update. Going to Catalina is also one-way because it changes the file system from HFS to AFS. And iOS is famously non-downgradable.
- rbanffy 6y ago> What? You can definitely downgrade to an earlier MacOS. Unless they got a brand-new M1-based Mac. Macs usually don't install versions of macOS prior to their launches.
- 0000011111 6y agoUse "Adobe Acrobat Reader DC" for pdf work on macOS v11.1
- tonyedgecombe 6y agoI tried that and it was less reliable than Preview.
- ProAm 6y agoIn what ways?
- e40 6y agoLet's be real. Every single macOS release, until it reaches x.y.4 or x.y.5 is just in beta and you are the tester. I upgraded to Catalina when it hit 10.15.6, and I watched for the year since the release all the comments and posts about the horrible things it was doing to their computer, files, apps, etc. Apple supports the latest 2 versions of macOS. Always be on the "previous" one is my advice. Since my family and friends started following it, they are much happier and more productive. Let the masses beta test.
- fastball 6y agoIs that not like, every piece of software ever? I don't know very many pieces of widely used / actively developed software that stayed static on X.0.0 for more than a couple weeks after release or so.
- e40 6y agoNo, it's not. I knew I'd get downvotes. Don't mind. I don't say this about macOS lightly. I've been using it since 10.0.
- krull10 6y agoSeconded for macOS. I usually update when the next major release is about to be announced. By 11 months they usually finally have the bugs worked out. It isn’t always necessary for every yearly release, but once you’ve been burned a few times you learn it’s better to wait for several point releases...
- YetAnotherNick 6y agoPDFs 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.
- tonyedgecombe 6y agoThe PDF file format has a mechanism in it for modifying documents.
- lilyball 6y agoI 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 what happened.
- dewey 6y agoThere’s a list of blog posts about the same problem linked in the article including a radar from 2016 (https://openradar.appspot.com/29786282 https://openradar.appspot.com/29786282) on Apple’s bug tracker. It’s not exactly an obscure bug that nobody knows how to reproduce.
- lilyball 6y agoA 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.
- dewey 6y agoThere might be newer Radars too, I can only see that 2016 one because some kind soul set up a public interface to show a subset of submitted Radars. With Apple's opaque and in-transparent bug reporting process there's no way of knowing if someone already reported it. I've submitted numerous feedbacks already but I can't do that for everything or do the homework for a trillion dollar company.
- matrixagent 6y ago> If you're not going to do the work to figure out what the corruption is … I'm sorry, but last time I checked neither Apple nor ABBYY pay my salary. I really don't understand these takes. If Apple or ABBYY want my PDFs, they should be able to find my email address rather easily. Your tl;dr version of the post is completely unfair. I publicly criticize Apple because they are breaking something that potentially affects a lot of people who are unlikely to even know about it, and they are doing it for at least the second time now. If you don't think that's worthy of criticism, I don't know what is. I also love how so many people assume I didn't already talk to support and file radars. I guess you had better luck in the past than me, but I can assure you, these options aren't always as useful as you might think they are.
- Someone 6y agoAt first glance, it’s a replacement cypher. Every ‘a’ becomes a filled square, every ‘b’ a ‘p’, every ‘c’ a ‘(‘, every ‘d’ a ‘)’, etc. However, there are exceptions, for example the first ‘b’ on line 10. It becomes an ‘ä’ on line 21. I guess that’s because that is bold text, and thus a different font.
- ehutch79 6y agoApple has a lot of shit they need to fix in macOS and the accompanying apps. That said, the author of this article is clearly an ass, and i have a hard time being sympathetic. Assuming the pdf is actually in spec, which it's probably not, this shouldn't be happening. That said, if the 3rd party app vendor says the pdfs they generate are broken in big sur, that should tell you, they may be broken other places as well, and it's probably not apple's issue.
- matrixagent 6y agoCould you explain why or how exactly I'm an ass?
- ehutch79 6y agoTo quote: """But Apple didn’t tell me that I can’t upgrade to Big Sur when I use ABBYY"""
- matrixagent 6y agoThis is at least the second time that Apple breaks Preview in this way. I outlined why this bug is something a lot of users could run into, and I even mention that I'm not necessarily holding it against them that it breaks, but specifically that they don't even care to mention it breaking. After the first time, which was a big deal at the time, they should have put safeguards in place so that they could notice it happening. If the fault is with ABBYY, then I'm okay with Apple breaking it for the sake of internally improving Preview, and blame for the breakage lies with ABBYY. But I expect Apple to tell me – because it happened before. That blame lies with Apple. That is my reasoning, and I don't think that's too high a bar for one of the richest companies on the planet, priding themselves in the details and "it just works". You don't have to agree with that, obviously. Calling me an ass for that is extremely rude and uncalled for, though. I was under the impression that this tone was actually not acceptable here.
- ztravis 6y agoMy 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).
- duskwuff 6y agoThis is almost certainly it. I've seen similar issues with copy/paste from poorly constructed PDFs, often ones generated by "print to PDF" features.
- arthur2e5 6y agoVery old LaTeX PDFs tend to have this issue too. Chances are pretty slim for profs to edit PDFs witb Preview, I think…
- duskwuff 6y agoYep, 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.
- mkl 6y agoOr not even vectors, but lots of little bitmaps. It's really awful.
- lrossi 6y agoI 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.
- 6y ago
- fastball 6y agoFrom 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.
- matrixagent 6y agoIn 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.
- non-nil 6y agoOn 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 https://exiftool.org/TagNames/PDF.html
- matrixagent 6y agoThat's exactly what I'm planning to explore as a workaround to remove the blank pages until ABBYY and/or Apple sort this out. :)
- dev_tty01 6y agoPreview used to be solid, but it has been increasingly fragile in recent years. I found PDF Expert to be a great replacement. I have no affiliation.
- cosmotic 6y agoThe text corruption doesn't appear to be random. The same word gets converted to the same corruption. It's more likely an encoding/decoding bug.
- mulmen 6y agoI 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.
- cle 6y agoI 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.
- mulmen 6y agoAfter 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.
- tekacs 6y agoThey've finally removed the keyboard shortcut for this in Big Sur. :) It was Cmd + Delete/Backspace before.
- OkGoDoIt 6y agoWhich on Windows is the key combination to delete the most recently typed word, and is basically muscle memory to replace spelling mistakes for me...
- nt2h9uh238h 6y agoIs this German?
- matrixagent 6y agoYes.
- cprecioso 6y agoThis happened to me in Catalina as well. This summer I was preparing the paper proceedings for a conference, which were made with InDesign. I had to remove a couple of pages from the output, did so with Preview, and from then on, the text was garbled on copy-pasting. Had to switch to using Acrobat for that step.
- userbinator 6y agoI remember many years ago distributing PDFs as part of course material, that Adobe's official reader would open just fine, but Mac's built-in one wouldn't (and simply fail with a useless "an error occurred" message.) Only a small subset of the class was using Macs and the built-in reader, so it took a while to discover. The problem eventually turned out to be some oddity in the way it treats whitespace[1], that Adobe and a few other readers were perfectly fine with, but not Preview. [1] PDF is one of the strangest file formats I've worked with. It is a bizarre mix of binary and text, and some of the other design decisions are also perplexing.
- rubyn00bie 6y ago> 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?
- agersant 6y agoI haven't worked with it myself but I heard Photoshop's PSD format is a good candidate.
- Someone 6y agohttps://github.com/gco/xee/blob/4fa3a6d609dd72b8493e52a68f316f7a02903276/XeePhotoshopLoader.m#L108 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 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.
- rubatuga 6y agoOnce again, the Hacker News comments prove to be more useful and insightful than the article itself.
- skissane 6y agoI 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...)
- qwerty456127 6y agoI have encountered too man PDFs (mostly digital originals rather than OCRed scans) corrupted this way during the recent months. Now I see why...
- sn41 6y agoThere 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.
- ehutch79 6y agoWhy would installing from source change things. Without finding/fixing the bug, you're just using the same compiled code as before
- sn41 6y agoI was trying avoid library incompatibilities. Pulled everything from the repository and recompile with the latest libraries. I also tried a couple of different libraries. I gave up after a week or so. (What I did not do was to compile the libraries from the source as well.) I really like mupdf so it was a big nuisance for me to lose that.
- juskrey 6y agoPreview for PDF manipulation was a nice try at first, until I realized I suddenly have unexpected problems with produced docs, trouble with drag-and-drop, overwritten files etc.. Now I am using PDFGenius and never looking back.
- unfocused 6y agoI think the HN crowd has forgotten that the entire legal system uses PDFs, and in addition uses the redaction features of the likes of Adobe Acrobat, as well as others trying to squeeze in like FoxIT. Redaction is huge in governments that have gone digital. Gone are the days where you print the paper, black it out, and then photocopy it. I have worked with PDFs for a long time, and if you ever wanted compatibility, you had to use Adobe Pro, since there were so many bad PDFs with weird embedded stuff that only Adobe could read properly...because it was initially created in Adobe sigh All other products try to catch up, but they can't clean up the mess that Adobe has left behind.
- kekeblom 6y agoI had an issue recently where the form contents filled and saved with Preview.app would not show up in acrobat reader. I've encountered this in two cases so far, with two completely different documents.