[
https://issues.apache.org/jira/browse/PDFBOX-6207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18084037#comment-18084037
]
ASF subversion and git services commented on PDFBOX-6207:
---------------------------------------------------------
Commit 1934717 from Maruan Sahyoun in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1934717 ]
PDFBOX-6207: simplify getting string
> Setting checkbox value fails when field has an invalid /Opt entry
> -----------------------------------------------------------------
>
> Key: PDFBOX-6207
> URL: https://issues.apache.org/jira/browse/PDFBOX-6207
> Project: PDFBox
> Issue Type: Improvement
> Components: AcroForm
> Affects Versions: 2.0.36, 3.0.7 PDFBox, 4.0.0
> Reporter: Maruan Sahyoun
> Assignee: Maruan Sahyoun
> Priority: Major
> Attachments: form_with_checkbox.pdf
>
>
> from the users mailing list:
> SUMMARY
> When a checkbox field in an AcroForm PDF contains an empty /Opt array (/Opt
> []) in its field dictionary, calling PDCheckBox.setValue("Yes") throws an
> IllegalArgumentException, even though "Yes" is a perfectly valid export value
> defined by the field's appearance states.
> The same field can be checked and unchecked without any error using Adobe
> Acrobat products (Acrobat Reader, Acrobat Pro), which treat the empty /Opt
> array as if it were absent. This confirms that the PDF is valid and the issue
> is specific to PDFBox's validation logic.
> ERROR MESSAGE
> java.lang.IllegalArgumentException: value 'Yes' is not a valid option for the
> field Check_Info_Post_andere, valid values are: [] and Off
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]