[
https://issues.apache.org/jira/browse/PDFBOX-1927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13906057#comment-13906057
]
Tilman Hausherr commented on PDFBOX-1927:
-----------------------------------------
I get a different error with the 2.0 version:
org.apache.pdfbox.pdfparser.BaseParser:284 - Invalid dictionary, found: '�' but
expected: '/'
Anyway, try loadNonSeq() instead. (the second parameter is null)
> ClassCastException: COSInteger cannot be cast to COSObject
> ----------------------------------------------------------
>
> Key: PDFBOX-1927
> URL: https://issues.apache.org/jira/browse/PDFBOX-1927
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 1.8.4
> Environment: Windows 7 64 bit
> Reporter: CP
> Priority: Critical
> Attachments: FlexRiskTrackerPrompt_166.pdf, TestPDFBox.java
>
>
> Calling PDDocument.load("myPDF.pdf") throws ClassCastException.
> I will attach a short sample program and PDF.
> {code}
> 2014-02-19 14:01:11,220 WARN [org.apache.pdfbox.pdfparser.BaseParser] (main)
> Invalid dictionary, found: '?' but expected: '/'
> Exception in thread "main" org.apache.pdfbox.exceptions.WrappedIOException
> at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:263)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1238)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1203)
> at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1128)
> at
> com.biosignia.framework.functionalTests.webServices.TestPDFBox.main(TestPDFBox.java:12)
> Caused by: java.lang.ClassCastException: org.apache.pdfbox.cos.COSInteger
> cannot be cast to org.apache.pdfbox.cos.COSObject
> at
> org.apache.pdfbox.pdfparser.PDFParser.readVersionInTrailer(PDFParser.java:859)
> at
> org.apache.pdfbox.pdfparser.PDFParser.parseTrailer(PDFParser.java:845)
> at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:502)
> at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:194)
> ... 4 more
> {code>
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)