[ 
https://issues.apache.org/jira/browse/PDFBOX-4617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16897218#comment-16897218
 ] 

Maruan Sahyoun edited comment on PDFBOX-4617 at 7/31/19 2:15 PM:
-----------------------------------------------------------------

Could you also show how you are trying to set the value? From the error it 
seems you are passing the value '1' where the radio button field has other on 
and off values set in the forms definition.

Please also mention which version of PDFBox you are using.


was (Author: msahyoun):
Could you also show how you are trying to set the value? From the error it 
seems you are passing the value '1' where the radio button field has other on 
and off values set in the forms definition.

> PDButton.setValue cannot handle radios with duplicate names and choices
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-4617
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4617
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>            Reporter: Rosalind Douglas
>            Priority: Major
>         Attachments: Radio buttons with duplicate names and choices.pdf
>
>
> Hello, thank you for all of your efforts in building and maintaining PDFBox. 
> We use it extensively for parsing PDFs, programmatically setting values and 
> flattening PDFs for print.
> BUG: In the attached PDF, when we try to programmatically set the value of 
> the radio buttons, we receive this error:
> {code:java}
> 2019-07-31 08:59:36 ERROR (Prism.java:3744)- STACK: 
> java.lang.IllegalArgumentException: value '1' is not a valid option for the 
> field radio1, valid values are: [no, yes] and Off at 
> org.apache.pdfbox.pdmodel.interactive.form.PDButton.checkValue(PDButton.java:376)
>  ~[pdfbox-2.0.16.jar:2.0.16] at 
> org.apache.pdfbox.pdmodel.interactive.form.PDButton.setValue(PDButton.java:158)
>  ~[pdfbox-2.0.16.jar:2.0.16]
> {code}
> PROPOSED FIX: 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to