I can see the probable cause of the problem. Can you post a link to the PDF 
to be sure?

Paulo

----- Original Message ----- 
From: "moshe" <[EMAIL PROTECTED]>
To: <itext-questions@lists.sourceforge.net>
Sent: Wednesday, August 08, 2007 4:11 PM
Subject: [iText-questions] java.lang.ClassCastException: 
com.lowagie.text.pdf.PRIndirectReference cannot be cast to 
com.lowagie.text.pdf.PdfNumber


>
> I am getting the following error while trying to load a pdf . I have 
> tested
> with 1.4, 1.5 and  2.
>
>
>
> java.lang.ClassCastException: com.lowagie.text.pdf.PRIndirectReference
> cannot be cast to com.lowagie.text.pdf.PdfNumber
> at com.lowagie.text.pdf.PdfReader.getNormalizedRectangle(Unknown Source)
> at com.lowagie.text.pdf.PdfReader.getPageSize(Unknown Source)
> at com.lowagie.text.pdf.PdfReader.getPageSizeWithRotation(Unknown Source)
> at com.lowagie.text.pdf.PdfReader.getPageSizeWithRotation(Unknown Source)
>
>
>                                PdfReader reader = new
> PdfReader(file.getPath());
> int n = reader.getNumberOfPages();
> if (f == 0) {
> document = new Document(reader.getPageSizeWithRotation(1));
> writer = new PdfCopy(document, new FileOutputStream(temp));
> document.open();
> }


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to