Replies: 1 comment
-
When updating an annotation with a tool that is different from the tool that created it, errors or unexpected results are to be expected in general - see here. Independently from this, there is some inconsistency in PyMuPDF's behavior as you have noticed: In any case, your creator software makes the annotation in a way such that everything is inside the specified rectangle, whereas the PyMuPDF update changes the rectangle such that 50% of the line width area is outside ... Can you please give me the annotation object details as created by your initial editor? Probably an out like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I wanted to quickly ask why PyMuPDF behaves the way it does in the following example.
I added a rectangle as a note using my editor (to define a zone on my floor plan). Now I want to use PyMuPDF to add my "content" and save it. The problem I observe is that after calling
annot.update(),
the boundaries somehow change.See following images:

Rectangle (created in the editor)
After I run:
Image 2: (updated rectangle)

When I open the PDF, you can see that the "selection" frame does not match the one in the first image.
Additional:

Image 3:
Shows the behavior when I simply stretch the rectangle to the right in the editor. Then the "border" just jumps back.
It's hard for me to explain this more precisely.
Am I missing something about how to properly use the
annot.update()
method?But I also observe:
terminal printout:
But my definition is 10,10,100,100
Maybe some can drop a comment to understand this circumstance here and thx for your help!
BTW: I have the same behavior with PDFXchange and Ocular.
greets: ibbit
Beta Was this translation helpful? Give feedback.
All reactions