You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Scott Coldwell (JIRA)" <ji...@apache.org> on 2017/01/18 19:14:26 UTC

[jira] [Created] (PDFBOX-3656) Problem when setting COSName.Off on radio button

Scott Coldwell created PDFBOX-3656:
--------------------------------------

             Summary: Problem when setting COSName.Off on radio button
                 Key: PDFBOX-3656
                 URL: https://issues.apache.org/jira/browse/PDFBOX-3656
             Project: PDFBox
          Issue Type: Bug
          Components: AcroForm
    Affects Versions: 2.0.3
            Reporter: Scott Coldwell


The following error occurs when trying to set the radio button to COSName.Off when the field contains /Opt values:

{code}
ERROR (PDFDocument.java:98) - Error populating form us/gov/opm/SF2817
java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.ArrayList.elementData(ArrayList.java:418) ~[na:1.8.0_45]
	at java.util.ArrayList.get(ArrayList.java:431) ~[na:1.8.0_45]
	at org.apache.pdfbox.pdmodel.common.COSArrayList.get(COSArrayList.java:544) ~[pdfbox-2.0.3.jar:2.0.3]
	at org.apache.pdfbox.pdmodel.interactive.form.PDButton.constructAppearances(PDButton.java:275) ~[pdfbox-2.0.3.jar:2.0.3]
	at org.apache.pdfbox.pdmodel.interactive.form.PDTerminalField.applyChange(PDTerminalField.java:228) ~[pdfbox-2.0.3.jar:2.0.3]
	at org.apache.pdfbox.pdmodel.interactive.form.PDButton.setValue(PDButton.java:167) ~[pdfbox-2.0.3.jar:2.0.3]
{code}

the code that triggers the error is:

{code}
field.setValue(COSName.Off.getName());
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org