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

Summary : Null Pointer Exception while loading few TrueTypeFont.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.8.1
    • Component/s: FontBox, JempBox
    • Labels:
      None
    • Environment:
      Mac OS, Linux, Java

      Description

      I tried loading few fonts Angelina, PreludeFLF, Miama in PDFBox 1.7.0. I am getting Null Pointer Exception in the PDFBox, the error is given below. I used loadTTF method.

      String fontFile = angelina.ttf;
      PDFont pdffont = PDTrueTypeFont.loadTTF(doc,
      Sample.class.getClassLoader().getResource(fontFile).openStream());

      ERROR [com.sample.SampleImpl] (http--100.0.0.1-8080-2) Could not load PDTrueTypeFont for angelina.ttf: java.lang.NullPointerException
      at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadDescriptorDictionary(PDTrueTypeFont.java:354)
      at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:171)
      at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:154)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              harippriya Harippriya Parameswaran
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: