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

Fixes for #2013 and #2045 #2046

Closed
wants to merge 2 commits into from
Closed

Fixes for #2013 and #2045 #2046

wants to merge 2 commits into from

Conversation

JorjMcKie
Copy link
Collaborator

Fixes #2013 and #2045

Additional safeguard when field is being deleted via `page.delete_widget()`:
In this case, the underlying annotation may not have been re-established (attribute "_annot"), which will there for be checked.
Python C function `Py_BuildValue("s", fontname)` will fail if fontname is not UTF8-encoded.
Use PyUnicodeRawEscape function for fontnames instead - like everywhere else in PyMuPDF.
@julian-smith-artifex-com
Copy link
Collaborator

These commits are already on the 1.21 branch.

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

Successfully merging this pull request may close these issues.

AttributeError: 'Widget' object has no attribute '_annot' in delete widget
2 participants