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

NPE with barcode ttf font

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.0
    • None
    • Writing

    Description

      Inspired by this complaint
      http://stackoverflow.com/a/24432822/535646
      I tried loading barcode fonts with PDFBox, with the command

      PDTrueTypeFont.loadTTF()
      

      With the file Code39.ttf that I get here
      http://www.myfont.de/download.php?winfont=bar-code-39-lesbar&type=zip
      I get this exception:

      Exception in thread "main" java.lang.NullPointerException
      	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.makeFontDescriptor(PDTrueTypeFont.java:328)
      	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.<init>(PDTrueTypeFont.java:127)
      	at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:80)
      

      Attachments

        1. Code39.ttf
          17 kB
          Tilman Hausherr

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: