Hacker News new | ask | show | jobs
by masswerk 2005 days 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.

1 comments

I 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.
Are 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.