I get a NullPointerException while trying to find out if a particular font is 
"Standard14":

Exception in thread "main" java.lang.NullPointerException
        at 
org.apache.pdfbox.pdmodel.font.PDSimpleFont.isStandard14(PDSimpleFont.java:377)
        at 
com.itesoft.pdfapi.cmdline.TestIsStandard14Font.main(TestIsStandard14Font.java:24)

Code:
    public static void main(String[] args) throws IOException {
        PDDocument d = PDDocument.load(new File(args[0]));
        PDPage p = d.getPage(0);
        PDFont f = p.getResources().getFont(COSName.getPDFName("Font0"));
        f.isStandard14(); //Exception here
    }

Sample file (simplification of a real-life example):
http://ge.tt/6FV9vmz2

There is something wrong with this font or it is an issue in pdfbox?

Esteban Ruiz

Reply via email to