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

NPE on org.apache.pdfbox.pdmodel.font.PDType0Font.readEncoding

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.6
    • Fix Version/s: 2.0.8, 3.0.0 PDFBox
    • Component/s: PDModel
    • Labels:
      None
    • Environment:
      Distributor ID: Ubuntu
      Description: Ubuntu 12.04.5 LTS
      Release: 12.04
      Codename: precise

      Description

      I got a NullPointerException on file attached. The file can see using PDF reader (I tested using Chrome):

      java.lang.NullPointerException
      	at org.apache.pdfbox.pdmodel.font.PDType0Font.readEncoding(PDType0Font.java:208)
      	at org.apache.pdfbox.pdmodel.font.PDType0Font.<init>(PDType0Font.java:129)
      	at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:83)
      	at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:143)
      	at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
      	at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:838)
      	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:495)
      	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:469)
      	at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
      	at org.apache.pdfbox.text.LegacyPDFStreamEngine.processPage(LegacyPDFStreamEngine.java:139)
      	at org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:391)
      	at org.apache.tika.parser.pdf.PDF2XHTML.processPage(PDF2XHTML.java:147)
      	at org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:319)
      	at org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:266)
      	at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:117)
      	at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:159)
      	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
      

        Attachments

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              Giorgy Jorge Spinsanti
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: