Ok. Thanks! Esteban ________________________________ De: Tilman Hausherr <thaush...@t-online.de> Enviado: sábado, 30 de noviembre de 2019 04:14 Para: users@pdfbox.apache.org <users@pdfbox.apache.org> Asunto: Re: NullPointerException in PDSimpleFont.isStandard14()
Hi, This was fixed but not yet released: https://issues.apache.org/jira/browse/PDFBOX-4682 Until then, check that the font is not type 3 before calling isStandard14(). Tilman Am 29.11.2019 um 20:31 schrieb Esteban R: > 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org