You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/09/10 15:24:28 UTC
[jira] [Created] (PDFBOX-2339) ArrayIndexOutOfBoundsException when
type1 font is empty
Tilman Hausherr created PDFBOX-2339:
---------------------------------------
Summary: 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
Attachments: PDFBOX-2339-168002.pdf
{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)