-
Notifications
You must be signed in to change notification settings - Fork 510
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
AttributeError: 'Widget' object has no attribute '_annot' in delete widget #2013
Comments
You cannot use for page in doc:
w = page.first_widget
while w:
if w.field_type == 6:
w = page.delete_widget(w) # delivers None or next after deleted one
else:
w = w.next |
I have tried the above solution. It is throwing the same error. |
Can't be! I tried it out on an example. |
|
Indeed, there is a bug!
to this:
A final fix will be included in the new version. |
Describe the bug
We are trying to detect the signature widget and delete it. When we perform the operation it throws AttributeError: 'Widget' object has no attribute '_annot'
Sample PDF:
signed_sample.pdf
To Reproduce
Expected behavior
The signature widget should be deleted.
Error Screenshots
Your configuration (mandatory)
PyMuPDF 1.20.2: Python bindings for the MuPDF 1.20.3 library.
Version date: 2022-08-13 00:00:01.
Built for Python 3.9 on win32 (64-bit).
The text was updated successfully, but these errors were encountered: