You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the attached pdf form, I am trying to rename the keys using update_widget_key (and a custom key-> key json map). During that process, I've remarked that a widget key was incorrectly retrieved :
The checkbox Gain de 2 classes on page 2 should be named "Gain de 2 classes.0" (according to Acrobat DC) but PyPDFForm is retrieving it as "0".
Moreover, when I try to rename this checkbox widget with : update_widget_key ("0", "situation_finale_gain_2_classes")
what I get for the renamed widget is : key="Gain de 2 classes. situation_finale_gain_2_classes"
looks like something is broken because of the dot . in the widget key ...
It appears that other non-Acrobat PDF viewers like DocFly also sees that checkbox with a key of 0:
I think both PyPDFForm and DocFly retrieved the key based on the /T property of the widget. However, the way Acrobat retrieved the key is by combining the /TU and /T properties with a dot inbetween:
Which would explain why when you tried to modify the key by doing update_widget_key ("0", "situation_finale_gain_2_classes") it only modified the part after the dot (although I'm not sure where that extra space comes from).
In the meantime I suggest try to modify that key to remove the dot by using some PDF viewers instead of the library and see what happens. I need to do some researches around the /TU property and see whether it should be part of a widget's key.
Version
PyPDFForm=1.4.37
Issue Description
In the attached pdf form, I am trying to rename the keys using
update_widget_key
(and a customkey-> key
json map). During that process, I've remarked that a widget key was incorrectly retrieved :The checkbox
Gain de 2 classes
onpage 2
should be named"Gain de 2 classes.0"
(according to Acrobat DC) but PyPDFForm is retrieving it as"0"
.Moreover, when I try to rename this checkbox widget with :
update_widget_key ("0", "situation_finale_gain_2_classes")
what I get for the renamed widget is :
key="Gain de 2 classes. situation_finale_gain_2_classes"
looks like something is broken because of the dot
.
in the widget key ...202402_AttestationTravauxMPRaccompagne-devis_WEBAI.pdf
The text was updated successfully, but these errors were encountered: