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

NullPointerException in TrueTypeEmbedder.createFontDescriptor() with OCR-B font

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.20
    • 2.0.21, 3.0.0 PDFBox
    • None
    • None

    Description

      Exception in thread "main" java.lang.NullPointerException
      	at org.apache.pdfbox.pdmodel.font.TrueTypeEmbedder.createFontDescriptor(TrueTypeEmbedder.java:190)
      	at org.apache.pdfbox.pdmodel.font.TrueTypeEmbedder.<init>(TrueTypeEmbedder.java:83)
      	at org.apache.pdfbox.pdmodel.font.PDCIDFontType2Embedder.<init>(PDCIDFontType2Embedder.java:76)
      	at org.apache.pdfbox.pdmodel.font.PDType0Font.<init>(PDType0Font.java:220)
      	at org.apache.pdfbox.pdmodel.font.PDType0Font.load(PDType0Font.java:67)
      

      when loading the font at
      https://www.dafontfree.net/freefonts-ocrb-f151774.htm

      The font has no os2 table. We should throw an IOException instead.

      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: