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:46:03 UTC
[jira] [Updated] (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 ]
Petr Slaby updated PDFBOX-2137:
-------------------------------
Attachment: 000536.pdf
PageDrawer.drawType3String.patch
> 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
> 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)