You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2025/11/15 04:47:00 UTC
[jira] [Commented] (PDFBOX-6101) NullPointerException in FontMapperImpl.getFontMatches()
[ https://issues.apache.org/jira/browse/PDFBOX-6101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18038518#comment-18038518 ]
ASF subversion and git services commented on PDFBOX-6101:
---------------------------------------------------------
Commit 1929745 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1929745 ]
PDFBOX-6101: avoid NPE, refactor
> NullPointerException in FontMapperImpl.getFontMatches()
> -------------------------------------------------------
>
> Key: PDFBOX-6101
> URL: https://issues.apache.org/jira/browse/PDFBOX-6101
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.35, 3.0.6 PDFBox
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Priority: Major
> Fix For: 2.0.36, 3.0.7 PDFBox, 4.0.0
>
>
> This happens in PDFDebugger when clicking on the font
> NullPointerException: null
> org.apache.pdfbox.pdmodel.font.FontMapperImpl.getFontMatches(FontMapperImpl.java:571)
> org.apache.pdfbox.pdmodel.font.FontMapperImpl.getCIDFont(FontMapperImpl.java:536)
> org.apache.pdfbox.pdmodel.font.PDCIDFontType0.<init>(PDCIDFontType0.java:129)
> org.apache.pdfbox.pdmodel.font.PDFontFactory.createDescendantFont(PDFontFactory.java:379)
> org.apache.pdfbox.pdmodel.font.PDType0Font.<init>(PDType0Font.java:97)
> org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:173)
> org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:170)
> org.apache.pdfbox.debugger.fontencodingpane.FontEncodingPaneController.<init>(FontEncodingPaneController.java:86)
> org.apache.pdfbox.debugger.PDFDebugger.showFont(PDFDebugger.java:1233)
> The cause is a missing font descriptor and a missing initialization in the fontmapper. I'll fix both although the second one isn't needed if the first is caught. The bug doesn't happen in rendering or text extraction.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org