Hello Apache PDFBox Team,

I want to use the font OCR-B for a PDF editing with PDFBox. But I get
the error by loading this font.

font = PDType0Font.load(pdDocument, new File(fontPath));


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)

I think something may be wrong with this font (this font exists under the
path and is a special font with only some characters.)

Maybe anybody here has met this problem and can share info for me, Thank You

Regards,

Pai

Reply via email to