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/08/02 22:33:11 UTC

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

Tilman Hausherr created PDFBOX-2251:
---------------------------------------

             Summary: 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


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.2#6252)