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

NullPointerException at PDPageContentStream.getName when setting Text Value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0.3, 2.0.4
    • Fix Version/s: None
    • Component/s: AcroForm
    • Labels:
      None
    • Environment:
      Linux

      Description

      Trying to set text input value. Works in almost all cases without a problem, but on some forms I get the following error:

      java.lang.NullPointerException: null
      at org.apache.pdfbox.pdmodel.PDPageContentStream.getName(PDPageContentStream.java:964) ~[pdfbox-2.0.3.jar:2.0.3]
      at org.apache.pdfbox.pdmodel.PDPageContentStream.setNonStrokingColor(PDPageContentStream.java:1172) ~[pdfbox-2.0.3.jar:2.0.3]
      at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.initializeAppearanceContent(AppearanceGeneratorHelper.java:211) ~[pdfbox-2.0.3.jar:2.0.3]
      at org.apache.pdfbox.pdmodel.interactive.form.AppearanceGeneratorHelper.setAppearanceValue(AppearanceGeneratorHelper.java:167) ~[pdfbox-2.0.3.jar:2.0.3]
      at org.apache.pdfbox.pdmodel.interactive.form.PDTextField.constructAppearances(PDTextField.java:263) ~[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.PDTextField.setValue(PDTextField.java:218) ~[pdfbox-2.0.3.jar:2.0.3]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dcarswel Dave Carswell
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: