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

Adam Nichols commented on PDFBOX-813:
-------------------------------------

Ah, I missed the doc.getDocumentCatalog().getAllPages(); part.  However, when I 
added that in just now, I found that it still worked okay with the latest code 
from SVN.  I made a few different changes to the parser recently so I'm not 
sure which of the changes fix the problem.  If you can try the latest code and 
confirm that it works, I'll go ahead and close this issue.

I'm not sure when PDFBox 1.3.0 will be released, but the changes will be in 
that version.  I'll bring it up to the other developers and see if we can come 
up with either an ETA or a list of tasks which should be completed for the 
1.3.0 release.

> ClassCastException: COSInteger cannot be cast to COSDictionary
> --------------------------------------------------------------
>
>                 Key: PDFBOX-813
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-813
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 1.2.1
>         Environment: Windows XP
> java version "1.6.0_12"
> Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
> Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)
>            Reporter: CP
>            Priority: Critical
>         Attachments: CancerSummReport_34914.pdf, PDFBoxBug.java
>
>
> I get the below exceptions when calling 
> pdfDoc.getDocumentCatalog().getAllPages(). The code continues after the first 
> exception because I've called 
> PDDocument.load("C:/CancerSummReport_34914.pdf", true)  setting the load 
> "force" param to true. The second exception causes the code to abort.
> (I will try uploading the PDF that causes this problem)
> 2010-09-02 16:47:47,521 [main] WARN  (PDFParser.java:189) - Parsing Error, 
> Skipping Object
> java.io.IOException: Error: Expected an integer type, actual='bj'
>       at org.apache.pdfbox.pdfparser.BaseParser.readInt(BaseParser.java:1310)
>       at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:497)
>       at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:179)
>       at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:878)
>       at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:843)
>       at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:768)
>       at com.xyz.framework.functionalTests.PDFBoxBug.main(PDFBoxBug.java:16)
> 2010-09-02 16:47:47,552 [main] WARN  (BaseParser.java:215) - Invalid 
> dictionary, found:? but expected:''
> Exception in thread "main" java.lang.ClassCastException: 
> org.apache.pdfbox.cos.COSInteger cannot be cast to 
> org.apache.pdfbox.cos.COSDictionary
>       at 
> org.apache.pdfbox.pdmodel.PDDocument.getDocumentCatalog(PDDocument.java:414)
>       at com.xyz.framework.functionalTests.PDFBoxBug.main(PDFBoxBug.java:18)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to