Finding and Highlighting Annotations/Comments #795
-
First off great work on this! After trying a few others this seems to be the most complete and regularly updated one around. I am dealing with a rather unique project. We have AutoCAD maps that have annotated layers with plots numbers on them then exported as a PDF. These then turn into comments/annotations in a PDF. I also have a large list of plots to find and then highlight so I can then plan a route. My problem is I am failing to see a way to mark an existing annotation. I could be missing something entirely but I am open to highlighting, borders, fills, font color changes, or really anything that stands out. Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thanks for the compliments! I am sure there are ways to help you do this.
If you update an annotation that existed before (meaning: created by some other software), be aware that this may have unwanted effects like text font changes etc. Details to be discussed. PyMuPDF can also extract drawings and present them as a list of dictionaries. Each such dictionary (I called those a "path") represents an interconnected set of "atomic" draw commands like lines, rectangles, curves, plus common properties like stroke and fill color, dashing, etc. There also always a rectangle is provided that surrounds the path. |
Beta Was this translation helpful? Give feedback.
Thanks for the compliments!
I am sure there are ways to help you do this.
annot.set_colors(fill=green, stroke=red)
orannot.set_border(width=1.5)
.If you update an annotation that existed before (meaning: created by some other software), be aware that this may have unwanted effects like text font changes etc. Details to be disc…