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

NPE when setting the DA of a PDTextField

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.9
    • 2.0.10, 3.0.0 PDFBox
    • AcroForm
    • None

    Description

      The following Kotlin Code results in a NullPointerException:

      when(pdField) {

      is PDTextField -> {
      {{     try {}}
      {{         pdField.value = value?.toString() ?: ""}}
      {{     } catch (ioException: IOException) {}}
      {{         pdField.cosObject.setString(COSName.DA, "/Helv 0 tf 0 g")}}
      {{         pdField.value = value?.toString() ?: ""}}
      {{    }}}

      }}

      Attachments

        1. F2_Datenblatt_022015.pdf
          172 kB
          Tilman Hausherr
        2. stacktrace.txt
          1 kB
          Christoph Grimmer-Dietrich

        Activity

          People

            tilman Tilman Hausherr
            cgd Christoph Grimmer-Dietrich
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: