You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/06/13 02:23:02 UTC
[jira] [Resolved] (PDFBOX-2137) Rendering of Type3 string fails
with NPE
[ https://issues.apache.org/jira/browse/PDFBOX-2137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Hewson resolved PDFBOX-2137.
---------------------------------
Resolution: Fixed
Now that PDFBOX-2135 is fixed I'm not getting ArrayOutOfBounds any more.
> 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
> Assignee: Andreas Lehmkühler
> Attachments: 000536.pdf, PageDrawer.drawType3String.patch
>
>
> 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)