You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Petr Slaby (JIRA)" <ji...@apache.org> on 2014/06/11 22:44:02 UTC
[jira] [Created] (PDFBOX-2137) Rendering of Type3 string fails with
NPE
Petr Slaby created PDFBOX-2137:
----------------------------------
Summary: Rendering of Type3 string fails with NPE
Key: PDFBOX-2137
URL: https://issues.apache.org/jira/browse/PDFBOX-2137
Project: PDFBox
Issue Type: Bug
Components: Rendering
Affects Versions: 2.0.0
Reporter: Petr Slaby
Rendering of the attached PDF fails with a NPE in PDFStreamEngine at the line 395 (float spaceWidthDisp = ...) because the textMatrix field is null. The reason is that the textMatrix gets reset while processing the first character of the string in PageDrawer#drawType3String(). The attached patch fixes the problem, but I am not quite sure whether it is the right solution.
To debug this, set a breakpoint in PDFStreamEngine#processEncodedText() with the condition "string.length == 2 && string[1] == 67" and watch the textMatrix field vanish after the first character has been processed.
--
This message was sent by Atlassian JIRA
(v6.2#6252)