Hi, > Graham Matthews <[email protected]> hat am 9. September 2013 um > 20:10 geschrieben: > > > Hi > > Attached is a PDF that renders strangely with PDFBox when converting to an > image. The dots come out as little vertical lines. Your pdf didn't make it due to some restirctions to the mailing list.
> I am on OS X using PDFBox 1.8.2. > > I suspect the issue is that the Dingbats font isn't loaded for some reason. I > tried to get the Dingbats font set loaded into my document as follows > > pdf = PDDocument.load(fileName); > PDTrueTypeFont.loadTTF(pdf, font.openStream()); > > where: > > - fileName is the attached PDF file > - font is a URL to my ZapDingbats.ttf file (I tried it both ways using > resource loading and an explicit path to the the file) It's not possible to load missing fonts afterwards > This call causes the following error > > java.lang.NullPointerException > at >org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadDescriptorDictionary(PDTrueTypeFont.java:409) > at >org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:201) > at >org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:177) > at >org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.loadTTF(PDTrueTypeFont.java:158) > > > I am wondering if this is a bug, or have i missed something obvious? I guess the font is embbeded and can't be loaded because of an known issue [1]. It's solved and will be part of our next major release, which isn't yet scheduled. > thanks > graham BR Andreas Lehmkühler [1] https://issues.apache.org/jira/browse/PDFBOX-490

