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

NullPointerException in PlainText constructor

    XMLWordPrintableJSON

Details

    Description

      Exception in thread "main" java.lang.NullPointerException
      	at org.apache.pdfbox.pdmodel.interactive.annotation.layout.PlainText.<init>(PlainText.java:54)
      	at org.apache.pdfbox.pdmodel.interactive.annotation.handlers.PDFreeTextAppearanceHandler.generateNormalAppearance(PDFreeTextAppearanceHandler.java:302)
      	at org.apache.pdfbox.pdmodel.interactive.annotation.handlers.PDFreeTextAppearanceHandler.generateAppearanceStreams(PDFreeTextAppearanceHandler.java:76)
      	at org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup.constructAppearances(PDAnnotationMarkup.java:897)
      	at org.apache.pdfbox.rendering.PageDrawer.showAnnotation(PageDrawer.java:1372)
      	at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:273)
      	at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:321)
      	at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:243)
      	at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:229)
      

      The cause is that annotation.getContents() is null, so the bug is in PDFreeTextAppearanceHandler.java. File is confidential.

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: