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/10/11 01:32:35 UTC
[jira] [Updated] (PDFBOX-2339) ArrayIndexOutOfBoundsException when
type1 font is empty
[ https://issues.apache.org/jira/browse/PDFBOX-2339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Hewson updated PDFBOX-2339:
--------------------------------
Fix Version/s: 2.0.0
> ArrayIndexOutOfBoundsException when type1 font is empty
> -------------------------------------------------------
>
> Key: PDFBOX-2339
> URL: https://issues.apache.org/jira/browse/PDFBOX-2339
> Project: PDFBox
> Issue Type: Bug
> Components: FontBox
> Affects Versions: 2.0.0
> Reporter: Tilman Hausherr
> Assignee: John Hewson
> Fix For: 2.0.0
>
> Attachments: PDFBOX-2339-168002.pdf
>
>
> Exception when rendering page 2 of the attached file:
> {code}
> Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0
> at org.apache.fontbox.type1.Type1Parser.parseASCII(Type1Parser.java:77)
> at org.apache.fontbox.type1.Type1Parser.parse(Type1Parser.java:62)
> at org.apache.fontbox.type1.Type1Font.createWithSegments(Type1Font.java:70)
> {code}
> The font is empty:
> {code}
> 249 0 obj
> <<
> /FontFile 250 0 R
> /Type /FontDescriptor
> /Ascent 833
> /CapHeight 708
> /Descent 250
> /Flags 34
> /FontBBox [ -170 -251 1020 934 ]
> /FontName /Bodoni-Italic
> /ItalicAngle 0
> /StemV 0
> >>
> endobj
> 250 0 obj
> << /Length 3 /Filter [ /ASCII85Decode ] /Length1 0 /Length2 0 /Length3 0 >>
> stream
> ~>
> endstream
> endobj
> {code}
> AR brings a warning, but is able to render the page.
> Skipping the parse call in PDType1Font.java can also render the page. Changing type1Parser.parse() to return null if the font is empty might also succeed, although I didn't test that.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)