Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-129

Error when setting the value of a combo box to " "

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.0, 1.8.7
    • Fix Version/s: 2.0.0
    • Component/s: AcroForm
    • Labels:

      Description

      [imported from SourceForge]
      http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1422082
      Originally submitted by catalino on 2006-02-01 17:59.

      Hi all.

      When I try to set the value of a combo box to " ", it
      gives the following error:

      Exception in thread "main"
      java.lang.ArrayIndexOutOfBoundsException: -2
      at java.util.ArrayList.set(Unknown Source)
      at
      org.pdfbox.pdmodel.interactive.form.PDAppearance.setAppearanceValue(PDAppearance.java:323)

      at
      org.pdfbox.pdmodel.interactive.form.PDVariableText.setValue(PDVariableText.java:145)

      at
      org.pdfbox.pdmodel.interactive.form.PDChoiceField.setValue(PDChoiceField.java:91)

      at pdfForms.PDFForms.setvalorCampo(PDFForms.java:235)
      at pdfForms.SetValores.main(SetValores.java:

      I found out the following. I think it may help you to
      understand the problem.
      When the default value, set by Acrobat Professional
      7.0, is set to " ", the error occurs; when is set to
      another value, lets say "A", the value " " is setted
      correctly. If i run the program again, trying to set
      the value " ", the error does not ocurr.

      Thanks,

      Luis Catalino

      [attachment on SourceForge]
      http://sourceforge.net/tracker/download.php?group_id=78314&atid=552832&aid=1422082&file_id=165878
      Doc1.pdf (application/pdf), 198269 bytes
      Form with a combo box

        Attachments

        1. Doc1.pdf
          194 kB
          Maruan Sahyoun

          Issue Links

            Activity

              People

              • Assignee:
                msahyoun Maruan Sahyoun
                Reporter:
                Anonymous
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: