-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add_freetext_annot is drawing text outside the annotation box #4254
Labels
Comments
This is a bug that started showing up after MuPDF also supported the callout format of this annotation type. |
JorjMcKie
added a commit
that referenced
this issue
Feb 3, 2025
For bug #4254, Ensure that multiple FreeText annotations are displayed as expected. We also add the following new features: 1. Support for subtype FreeTextCallout 2. Support for rich text.
Merged
julian-smith-artifex-com
pushed a commit
that referenced
this issue
Feb 4, 2025
For bug #4254, Ensure that multiple FreeText annotations are displayed as expected. We also add the following new features: 1. Support for subtype FreeTextCallout 2. Support for rich text.
julian-smith-artifex-com
pushed a commit
that referenced
this issue
Feb 4, 2025
For bug #4254, Ensure that multiple FreeText annotations are displayed as expected. We also add the following new features: 1. Support for subtype FreeTextCallout 2. Support for rich text.
Fixed in PyMuPDF-1.25.3. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the bug
I originally put this issue is sioyek here but I think this is an issue with pymupdf itself.
Annotations generated using
add_freetext_annot
sometimes appear invisible until one of its properties is changed in a pdf viewer.How to reproduce the bug
I set up this script that reproduces the issue:
annot
appears on the page when I open the file in okular, butannot2
appears invisible. When I go in okular, select the annotation, and change any of its properties, it appears. I attached a video demonstrating this:pymupdf_issue_20250126.mp4
Here are the appearance strings that we printed when I ran this:
I'm pretty unfamiliar with this library, so I threw these at chatGPT and the suggestion that it gave was that the text is initially being drawn outside the bounding box.
Additionally, when I call annot.update(), both annotations are invisible. Here are the appearance strings:
If anyone has an idea of what the issue might be I'm happy to try a fix myself, but I will have to ask for a bit of guidance on where to look since I've never touched this library before.
PyMuPDF version
1.25.2
Operating system
Linux
Python version
3.13
The text was updated successfully, but these errors were encountered: