Search text annotations in Mac Preview

Solution 1:

You have found what I consider to be a bug in the spotlight importer for several types of documents that Preview can use. I tested making an annotation with a slightly nonsensical word that spotlight had zero matches for on my Mac. (at least until this text gets indexed as a safari history item)

I tested a PDF and a PNG file with text annotations and none of the importers put that text into spotlight. I have filed a bug with Apple on that, but I would do so as well yourself. If the person screening the bug thinks it's a bug, usually one well document report gets things on the list to be fixed. If Apple considers this a feature, normally many reports asking for the same thing will be needed to change the minds that think not indexing annotations is actually beneficial to the system design.

On the outside, we don't know and can only file reports to change the things we want changed.

Here are the terminal commands I used to verify the bug in case someone has a workaround or knows of a better spotlight importer for PDF/PNG that would index the annotations.

mac:Desktop me$ mdfind ZZqwijibo
mac:Desktop me$ strings annontation.pdf |grep qwijibo
(ZZqwijibo) /AAPL:AKExtras 95 0 R /DA (/Helvetica 59 Tf 0.987 0.129 0.146 rg)
(ZZqwijibo) /DA (/Helvetica 59 Tf 0.987 0.129 0.146 rg) /F 4 /Q 1 /Subtype

The text is plainly stored on the filesystem, but the PDF importer is skipping the annotation text altogether like you report.

Solution 2:

You can search your annotations, but you won't be able to edit them anymore. To do this, you have to export your pdf file as a pdf (file > export as pdf). It's probably not the solution you were hoping for, but it's the only solution I know.