[ 
https://issues.apache.org/jira/browse/PDFBOX-1927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

CP updated PDFBOX-1927:
-----------------------

    Attachment: FlexRiskTrackerPrompt_166.pdf
                TestPDFBox.java

Pass PDF path and filename as an argument to the Java program.

> 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)

Reply via email to