Preview seems to have corrupted PDF and lost all text and arrow annotations

Solution 1:

I have found a way to get back apparently lost annotations. Following the most popular answer to this post, if you are able to install the utility qpdf, which I did simply with brew install qpdf, via homebrew, then invocation qpdf --qdf original.pdf unpacked.pdf has produced a file "unpacked.pdf" which contains my lost notes.

These are a little visually corrupted, however this method may be a huge relief if you have lost all of your annotations! - in my case it got back enough so I can trasfer them to a better application. I'm going to try skim.

More info: I got a lot back (when opening unpacked.pdf in preview). However I later found a few annotations were not recovered (notes with empty bodies - perhaps any errors which qpdf gives may be suggestive of whether it did a fully recovery or not).

However, I've just managed to get back more which the first unpack missed, by restoring an earlier version from time machine and just doing the same unpack process on that earlier file, which I called unpacked-2 - resorting to that when some yellow notes have empty bodies in my case is giving me a high rate of recovery so far...

Solution 2:

This seems to be a known problem, you cannot really trust MacOS Preview to display nor preserve annotations. My current technique is to open PDF files with annotations inside of Google Docs.