You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2014/09/19 16:41:45 UTC

[jira] [Closed] (PDFBOX-2251) NoSuchElementException when reading cmap format 4 subtable

     [ https://issues.apache.org/jira/browse/PDFBOX-2251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler closed PDFBOX-2251.
--------------------------------------

> NoSuchElementException when reading cmap format 4 subtable
> ----------------------------------------------------------
>
>                 Key: PDFBOX-2251
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2251
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>    Affects Versions: 1.8.6, 1.8.7, 2.0.0
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>             Fix For: 1.8.7, 2.0.0
>
>         Attachments: PDFBOX-2251-070040p321.pdf
>
>
> I get this with the attached file:
> {code}
> Exception in thread "main" java.util.NoSuchElementException
>         at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
>         at java.util.HashMap$KeyIterator.next(Unknown Source)
>         at java.util.Collections.max(Unknown Source)
>         at org.apache.fontbox.ttf.CMAPEncodingEntry.processSubtype4(CMAPEncodingEntry.java:404)
>         at org.apache.fontbox.ttf.CMAPEncodingEntry.initSubtable(CMAPEncodingEntry.java:92)
>         at org.apache.fontbox.ttf.CMAPTable.read(CMAPTable.java:72)
>         at org.apache.fontbox.ttf.TrueTypeFont.readTable(TrueTypeFont.java:277)
>         at org.apache.fontbox.ttf.TTFParser.parseTables(TTFParser.java:143)
>         at org.apache.fontbox.ttf.TTFParser.parseTTF(TTFParser.java:124)
>         at org.apache.fontbox.ttf.TTFParser.parseTTF(TTFParser.java:98)
> {code}
> While the 1.8 version recovers, the 2.0 version doesn't. My fix prevents the exception and puts out a warning. Adobe Reader can render the file, although  there is a weird glyph between "program" and "administration", and between "claimants" and "eligibility".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)