-
Notifications
You must be signed in to change notification settings - Fork 572
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
Fixed the bug where button_states()
returns None when /AP
points to an indirect object.
#2845
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
Thanks for this. Unfortunately there are some failures in our It would be more useful to us if you made these changes to the rebased implementation in |
There are lines in |
…to an indirect object. Description: Some PDF widget objects may not have their `/AP`(Appearance Dictionary) directly pointing to a dictionary, which is enclosed with '<< >>', but rather pointing to an indirect object, expressed by an xref number in the format 'NNN 0 R'. Therefore, the current button_states() only can correctly handle cases where `/AP` points to a dictionary and cannot handle cases where it points to an indirect object. Consequently, I have introduced additional logic to handle the latter scenario, ensuring that `button_states()` can accurately return the on/off state names for button widgets even when `/AP` points to an indirect object. Test: I have tested the modified `button_states()` function on the mentioned type of PDF, and it now correctly returns the states instead of None. I have copied the method's code to the same-named method in `src/__init__.py`.
I have addressed the issue of mixing tabs and spaces, and copied it to |
Description: Some PDF widget objects may not have their
/AP
(Appearance Dictionary) directly pointing to a dictionary, which is enclosed with '<< >>', but rather pointing to an indirect object, expressed by an xref number in the format 'NNN 0 R'. Therefore, the current button_states() only can correctly handle cases where/AP
points to a dictionary and cannot handle cases where it points to an indirect object. Consequently, I have introduced additional logic to handle the latter scenario, ensuring thatbutton_states()
can accurately return the on/off state names for button widgets even when/AP
points to an indirect object.Test: I have tested the modified
button_states()
function on the mentioned type of PDF, and it now correctly returns the states instead of None.