[ https://issues.apache.org/jira/browse/PDFBOX-5830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849803#comment-17849803 ]
ASF subversion and git services commented on PDFBOX-5830: --------------------------------------------------------- Commit 1918009 from Tilman Hausherr in branch 'pdfbox/branches/2.0' [ https://svn.apache.org/r1918009 ] PDFBOX-5830: avoid NPE and assume gid 0 if name doesn't exist in Adobe glyph list > NullPointerException: Cannot invoke "String.codePointAt(int)" because "uni" > is null > ----------------------------------------------------------------------------------- > > Key: PDFBOX-5830 > URL: https://issues.apache.org/jira/browse/PDFBOX-5830 > Project: PDFBox > Issue Type: Bug > Affects Versions: 2.0.31, 3.0.2 PDFBox > Reporter: Tilman Hausherr > Assignee: Tilman Hausherr > Priority: Major > Fix For: 2.0.32, 3.0.3 PDFBox, 4.0.0 > > > As reported to me by T.G. > {noformat} > Exception in thread "main" java.lang.NullPointerException: Cannot invoke > "String.codePointAt(int)" because "uni" is null > at > org.apache.pdfbox.pdmodel.font.PDTrueTypeFontEmbedder.setWidths(PDTrueTypeFontEmbedder.java:102) > {noformat} > This happens when an existing encoding is passed to PDTrueTypeFont.load() > with the 3rd parameter being an existing encoding "with differences" from > another font and this encoding has a ".notdef", because this isn't in the > Adobe glyph list. The whole thing is done to replace a simple not embedded > font with a hopefully equivalent embedded font. > Solution: assume GID 0 for such cases. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org