CP created PDFBOX-1927: -------------------------- Summary: 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
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)