I have developed a simple but effective tool to automate counting the instances of a specific statement in "sticky note" comment boxes. I'm using this fir marking student exam scripts. Users are using Ctrl+C,Ctrl+C to copy preexisting comments. However in some instances the comments paste directly on top of a preexisting comment. The script counts all but the user has not intended there to be a duplicate. I'm looking to find a way to access the coordinates of the comment boxes on the PDF so I can check for coordinate duplicates. Thanks in advance.
-
"but it's the getting hold of the "Rect" entries that I'm unable to do." Please elaborate on what you tried. What Languages and/or frameworks are you looking to use. What PDF SDK/libraries have you tried. stackoverflow.com/help/how-to-askRyan– Ryan2020-06-14 16:11:46 +00:00Commented Jun 14, 2020 at 16:11
-
Are you using a runtime viewer like Acrobat or do you need to do this using a library?joelgeraci– joelgeraci2020-06-15 14:42:28 +00:00Commented Jun 15, 2020 at 14:42
-
I'm self taught VBA, so, I have no experience of coding directly with PDF. As I mentioned, I am unable to find coordinates manually through Adobe.Dave-C– Dave-C2020-06-16 08:29:01 +00:00Commented Jun 16, 2020 at 8:29
Add a comment
|
1 Answer
coordinates of the comment boxes
All comments are Annotations, and Annotations are required to have a "Rect" entry that defines the coordinates/location of the annotation.
Rect is an array of 4 numbers, defining two opposite corners of the axis aligned bounding box (AABB). The canonical form is to define the bottom left first, and the top right second, but you should just assume it is two opposite corners.
1 Comment
Dave-C
I thought there must be that data, but it's the getting hold of the "Rect" entries that I'm unable to do.