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/07/19 15:25:38 UTC

[jira] [Comment Edited] (PDFBOX-2216) java.io.IOException: Found Token[kind=NAME, text= ] but expected LITERAL for type1 font

    [ https://issues.apache.org/jira/browse/PDFBOX-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14066716#comment-14066716 ] 

Tilman Hausherr edited comment on PDFBOX-2216 at 7/19/14 1:25 PM:
------------------------------------------------------------------

Yours has the same error message, but a different cause, see PDFBOX-2227.


was (Author: tilman):
Yours has the same error message, but a different cause (that I didn't find).

> java.io.IOException: Found Token[kind=NAME, text= ] but expected LITERAL for type1 font
> ---------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-2216
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2216
>             Project: PDFBox
>          Issue Type: Bug
>          Components: FontBox
>    Affects Versions: 2.0.0
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>              Labels: type1, type1font
>         Attachments: 1405627645601.txt, PDFBOX-2216-025977.pdf
>
>
> I get this with the attached file on page 3:
> {code}
> java.io.IOException: Found Token[kind=NAME, text= ] but expected LITERAL
>         at org.apache.fontbox.type1.Type1Parser.read(Type1Parser.java:727)
>         at org.apache.fontbox.type1.Type1Parser.readCharStrings(Type1Parser.java:658)
>         at org.apache.fontbox.type1.Type1Parser.parseBinary(Type1Parser.java:522)
>         at org.apache.fontbox.type1.Type1Parser.parse(Type1Parser.java:64)
> {code}
> The cause is that the font has a few NULL bytes (see attached font file). These are regarded as literals.
> My solution would be to skip them in Type1Lexer them like we skip spaces, but to put out a warning.
> WDYT?



--
This message was sent by Atlassian JIRA
(v6.2#6252)