fillpdf icon indicating copy to clipboard operation
fillpdf copied to clipboard

radio groups can not be fill

Open cheelix opened this issue 2 years ago • 4 comments

'Radio Button 1': None, None is the default option, When I change it to '1'
'Radio Button 1': 1, or 'Radio Button 1': '1', no matter the value is int or string, all of them can not be fill, the PDF that generated for this field is still empty. Do I set wrong? Thank you

cheelix avatar Jan 21 '23 09:01 cheelix

o I found a interesting things which is that radio button, I found after I fill it, I can see it be filled in Adobe reader, but in the chrome broswer,I can see it be filled. Why? some times this PDF need to be print out, so... you know, maybe there is some bug?

cheelix avatar Jan 21 '23 10:01 cheelix

Did you ever resolve this? I am unable to set the option buttons. (I have been using pypdftk until now, but it is adding an artifact to the buttons: they turn white when clicked in Adobe Reader..)

Chrescht avatar Jan 09 '24 18:01 Chrescht

Hi - The radio groups still don't work for me. If the field is called "Status" with two options - "Active" and "Inactive", I am using {'Status':'1'} if I want to select "Inactive." However, it keeps giving me the error that '1' is not an option. Can anyone suggest any other package in Python to set radio groups, please? or if someone has had luck with this package, please let me know.

shuklaa4 avatar Feb 06 '24 01:02 shuklaa4

@shuklaa4 you can use pypdf to get the options and their values:

reader = PdfReader("myForm.pdf")
reader.get_fields()

https://pypdf.readthedocs.io/en/latest/user/forms.html

Chrescht avatar Feb 12 '24 12:02 Chrescht