Skip to content
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

Empty vertices in ink annotation #3209

Closed
jesuslop opened this issue Feb 28, 2024 · 3 comments
Closed

Empty vertices in ink annotation #3209

jesuslop opened this issue Feb 28, 2024 · 3 comments

Comments

@jesuslop
Copy link

Description of the bug

The Annot.vertices of an ink annotation is empty. Annotation is visible in mupdf and other readers. Getting annotation xref and printing xref_object(xref) show that the vertices are in the dictionary. Inspecting the qpdf JSON dump comfirm vertex data presence. But printing annot.vertices gives the empty list (while annot.info is OK). Some relation to #525

How to reproduce the bug

import fitz

pdf = fitz.Document(filetype="pdf")
page = pdf.new_page()
page.add_ink_annot([[(300,300), (400, 380), (350, 350)]])
for a in page.annots():
    print(a.vertices)
pdf.save("borrame.pdf")  # Check the output PDF that the annotation is correctly drawn

output is [] instead of list of vertices

PyMuPDF version

1.23.25

Operating system

Windows

Python version

3.10

@julian-smith-artifex-com
Copy link
Collaborator

Fixed in 1.23.26.

@jesuslop
Copy link
Author

Fixed, thanks. Swift!

@julian-smith-artifex-com
Copy link
Collaborator

Thanks for confirming it works for you, and also for the simpler reproducer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants