Closed sanksara closed 7 months ago
Your code does not include the part that saves the result. In any case, a debugging strategy that works for me is to try to save the file, read it again and print out the annotations dictionary of the re-read file. This will show if your changes are being saved correctly.
Regarding the specific Push Button issue: Table 8.75 in Adobe Pdf Reference v. 1.7 specifies the bit position of 17 in annot.Ff for push buttons. The value you assign (19) has the 17th bit value equal to zero.
Also, you seem to assign annot.V twice, the second of the assignments being to bool, which is incorrect (the first assignment is correct, in fact).
Thanks Noted @sl2c
I am trying to create a form field button as per code below. However the line annot.Ff = 19 doesnot set the button to a push button. without the Field flag setting, it defaults to a check box.