Skip to content
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

radio groups can not be fill #41

Open
cheelix opened this issue Jan 21, 2023 · 4 comments
Open

radio groups can not be fill #41

cheelix opened this issue Jan 21, 2023 · 4 comments

Comments

@cheelix
Copy link

cheelix commented Jan 21, 2023

'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
Copy link
Author

cheelix commented Jan 21, 2023

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?

@Chrescht
Copy link

Chrescht commented Jan 9, 2024

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..)

@shuklaa4
Copy link

shuklaa4 commented Feb 6, 2024

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.

@Chrescht
Copy link

Chrescht commented Feb 12, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants