News for hackers. Stuff that matters.
Re:Preview in macOS Big Sur is destroying PDFs by arvindamirtaa on Wednesday December 16, 2020 @03:28PM (#25448148)
Here'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."

Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @03:34PM (#25448219)
It 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.

Re:Preview in macOS Big Sur is destroying PDFs by arvindamirtaa on Wednesday December 16, 2020 @03:40PM (#25448281)
> "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?

Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @03:42PM (#25448308)
No 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.

Re:Preview in macOS Big Sur is destroying PDFs by arvindamirtaa on Wednesday December 16, 2020 @03:45PM (#25448350)
I 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?

Re:Preview in macOS Big Sur is destroying PDFs by dayjobpork on Wednesday December 16, 2020 @03:52PM (#25448466)
You are opening it wrong /s
Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @03:58PM (#25448542)
You’re a victim of ABBYY’s poor PDF generation, that’s what.

Nothing excuses ABBYY if their PDFs are corrupt.

Re:Preview in macOS Big Sur is destroying PDFs by mynameisvlad on Wednesday December 16, 2020 @04:10PM (#25448703)
Wow, just wow.

The PDF works fine before saving in Preview. As in, Preview itself will render the file perfectly fine with OCR. By all accounts, the PDF is completely valid and uncorrupted at this point. Making a change to the file and saving it in Preview is what causes the corruption.

So how the hell could you possibly excuse Preview and call this a ABBYY issue when Preview is the one that causes the issue?

That's absurd to the highest level.

Re:Preview in macOS Big Sur is destroying PDFs by dkonofalski on Wednesday December 16, 2020 @04:59PM (#25449364)
>The PDF works fine before saving in Preview.

I think the disagreement here is that there's no evidence of this. Preview's error handling could very well be interpreting bad data and allowing the file to be opened. The question becomes, then, should Preview continue to propagate that bad data on save or should it try to correct it with the possibility that it corrupts just that data. If the PDF was not in-spec prior to Preview touching it but it is in-spec after Preview saves it, is it a good thing that Preview "fixed" the PDF file and made it "proper" or is it bad because it technically lost/corrupted data?

In other words, what is the "right" thing for a software to do in this case? Keep bad data and leave the file as "bad" or fix the issue to make a valid PDF and, as a side effect, remove the "bad" data?

Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @04:32PM (#25449013)
“By all accounts, the PDF is completely valid and uncorrupted at this point.”

Is it? I don’t see any accounts showing this to be a fact.

Re:Preview in macOS Big Sur is destroying PDFs by arvindamirtaa on Wednesday December 16, 2020 @04:00PM (#25448579)
Hahaha this is just brilliant.
Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @04:05PM (#25448642)
It’s not brilliant. It’s just correct if ABBYY is producing corrupt PDFs, which is a possible cause of this problem.
Re:Preview in macOS Big Sur is destroying PDFs by arvindamirtaa on Wednesday December 16, 2020 @04:10PM (#25448717)
If "Corrupt" = works fine until you make an edit and save using Preview, yes. You're 100% correct.
Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @04:33PM (#25449028)
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 by ehutch79 on Wednesday December 16, 2020 @07:20PM (#25450659)
Someone buys a bottle coke

They shake it up a lot

They hand me said bottle of coke

I open it, and get sprayed by fizz

THAT IS CLEARLY THE COCA-COLA COMPANIES FAULT!

Re:Preview in macOS Big Sur is destroying PDFs by ehutch79 on Wednesday December 16, 2020 @07:25PM (#25450714)
To be clear, my point here is that just because something is handed off, does not mean it's existence is reset or something.
Re:Preview in macOS Big Sur is destroying PDFs by function_seven on Wednesday December 16, 2020 @03:42PM (#25448306)
> 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, and appears to work today, is in fact working.

The PDFs didn't change, the application did. It's the application's fault.

If you have compatible behavior that you remove, it's on you to alert the user of the reduced functionality.

Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @03:52PM (#25448464)
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 it happened not to depend on correctness before.

In this case, Apple wouldn’t have been in a position to even know about the problem.

You know who would? ABBY, who have had free access to Big Sur for months. You’d think that even cursory testing at their end would have shown this problem.

They have had months to fix it, months to work with Apple on the issue, any months to publicize it it really is Apple’s fault.

Re:Preview in macOS Big Sur is destroying PDFs by tonyedgecombe on Wednesday December 16, 2020 @04:32PM (#25449018)
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 by zepto on Wednesday December 16, 2020 @04:41PM (#25449139)
This is mostly accurate, however it is an idealization to suggest that you can accept and not corrupt all of the ill-formed documents.

This is in principle impossible.

If it turns out that there is a widespread problem with many kinds of document that no longer work properly, I’ll be more inclined to say Apple is at fault.

But as it stands, it just seems like ABBY has been producing bad PDFs.

Re:Preview in macOS Big Sur is destroying PDFs by saagarjha on Thursday December 17, 2020 @03:52PM (#25460260)
I’m sure Apple had much more time with ABBY than ABBY had with Big Sur ;)
Re:Preview in macOS Big Sur is destroying PDFs by jfim on Wednesday December 16, 2020 @03:51PM (#25448451)
> 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.

It's not clear if the issue is caused by the PDF files produced by ABBYY, or if the issue is also present in other OCR'ed PDF files.

In either case, Preview shouldn't silently corrupt the file. It could display an error saying that it was unable to save the file, or a warning that some data couldn't be saved, so that the user can check if the file still works for them after saving.

Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @04:00PM (#25448583)
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.

Re:Preview in macOS Big Sur is destroying PDFs by duskwuff on Wednesday December 16, 2020 @04:26PM (#25448931)
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.

Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @04:35PM (#25449069)
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 by buckminster on Wednesday December 16, 2020 @06:39PM (#25450287)
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 by zepto on Wednesday December 16, 2020 @08:52PM (#25451384)
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 by ihuman on Wednesday December 16, 2020 @03:45PM (#25448358)
> They are mad that the pdf’s their scanner produces don’t work properly

The PDF that FineReader made worked properly. The one that Preview made didn't.

Re:Preview in macOS Big Sur is destroying PDFs by dkonofalski on Wednesday December 16, 2020 @05:01PM (#25449390)
That doesn't mean it's a valid PDF. Preview has error correction to try and recover document data when metadata is corrupt. It's entirely possible that the documents have always had corrupt metadata and that Preview now expects stricter PDF guidelines.
Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @03:58PM (#25448552)
How do you know it worked properly?
Re:Preview in macOS Big Sur is destroying PDFs by ihuman on Wednesday December 16, 2020 @04:23PM (#25448888)
The first paragraph and image in the article. When the author copied the text from FineReader's PDF and pasted it in TextEdit, it had the correct text. When the author tried that with preview's pdf, it pasted garbled data.
Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @04:43PM (#25449166)
That doesn’t mean there wasn’t file corruption.
Re:Preview in macOS Big Sur is destroying PDFs by ihuman on Wednesday December 16, 2020 @04:50PM (#25449256)
I never said anything about file corruption. You asked how I know FineReader worked properly, and I explained why the article showed it working properly, and that preview doesn't work properly anymore.
Re:Preview in macOS Big Sur is destroying PDFs by zepto on Wednesday December 16, 2020 @05:16PM (#25449532)
File corruption would be a way it would not be working properly that wouldn’t be revealed by what you did.