How, if it’s possible, should we read annotation properties through the scripting interface ?
I have before me a PDF record which, following some text annotations in DT3, has a populated Annotations panel, and returns the value 9 for the following AppleScript snippet:
tell application "DEVONthink 3"
tell front window
tell content record
annotation count
end tell
end tell
end tell
In the annotations panel, we can see these nine items:
You can get the annotations’ properties with the class PDFAnnotation from the PDFKit framework using the ObjC bridge. I’ve posted some code in this context here recently.
But: afaik, highlighted text annotations have no text property, only bounding boxes. Which might make it possible to retrieve the text, but I doubt that it’s a fun exercise.