Using the Automator Extract PDF Annotations action, I can get the text box ('/FreeText') contents returned, but it is sending back blank content for the one line of highlighted text in my test PDF. Changing the Highlight color makes no difference in the outcome.
So, I wrote a short Python/Objective-C application that sees the annotation type '/Highlight', and the PDF coordinates of that highlighted text content, but it refuses to return any highlighted text content using two different approaches:
- Directly asking for all content types.
- Testing for the annotation type of '/Highlight' and then telling it to return the annotation found at its coordinates in the PDF.
So, I can only deduce that there is either a bug in the PDFKit framework that causes Highlighted text to be ignored during a request for all text annotation, or I have overlooked some other programming angle to get at this highlighted text.
Short of submitting a bug report to Apple (which someone may have already done), there is nothing we as fellow users can do about this annotation extraction limitation.