You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/10/16 21:47:34 UTC

[jira] [Commented] (PDFBOX-2434) ClassCastException in readVersionInTrailer

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

ASF subversion and git services commented on PDFBOX-2434:
---------------------------------------------------------

Commit 1632427 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1632427 ]

PDFBOX-2434: ignore /Version number that isn't a Name and put out warning

> ClassCastException in readVersionInTrailer
> ------------------------------------------
>
>                 Key: PDFBOX-2434
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2434
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 1.8.7, 1.8.8, 2.0.0
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>             Fix For: 1.8.8, 2.0.0
>
>         Attachments: PDFBOX-2434-354867.pdf
>
>
> I get this exception with the attached file:
> {code}
> Exception in thread "main" java.lang.ClassCastException: org.apache.pdfbox.cos.COSFloat cannot be cast to org.apache.pdfbox.cos.COSName
>         at org.apache.pdfbox.pdfparser.PDFParser.readVersionInTrailer(PDFParser.java:918)
> {code}
> The cause is this:
> {code}
> << 
> /Type /Catalog 
> /PageLabels 68 0 R 
> /Version 1.39999 
> {code}
> A version must be like this:
> {code}
> /Version /1.4
> {code}
> I'll fix this by ignoring the wrong version and put out a warning.



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