By Date: <-- -->
By Thread: <-- -->

strange ClassCastException on init?



I don't think I can post the file (unfortunately), because it may be confidential information.
 
I _did_ find that I could page thru the document just fine, however, the "creator" has a bookmark that is apparently invalid, because clicking on it causes Acrobat to throw an "invalid document (109)" error, but other than that, as I said, you can continue to browse the file with no issues.
 
-AJ
----- Original Message -----
Sent: Wednesday, May 17, 2006 10:29 AM
Subject: RE: [iText-questions] strange ClassCastException on init?

That's probably fixed in CVS. You can post the file if you want to.
 
Paulo


From: itext-questions-admin (at) lists.sourceforge.net [mailto:itext-questions-admin (at) lists.sourceforge.net] On Behalf Of Aaron J Weber
Sent: Wednesday, May 17, 2006 3:04 PM
To: itext-questions (at) lists.sourceforge.net
Subject: [iText-questions] strange ClassCastException on init?

I have some code that's been running perfectly for a few months now.  Suddenly we ran into a document (I think) that causes it to crash when I'm trying to load it into a PdfReader!  Never seen this before, and the code has been used on thousands of documents -- 99% of which are created in the same manner.
 
My java code at the specified line is simple:
 
PdfReader reader = new PdfReader(fileList[f]);
 
The thrown (uncaught) exception is:
 
java.lang.ClassCastException
 at com.lowagie.text.pdf.PdfReader$PageRefs.iteratePages(Unknown Source)
 at com.lowagie.text.pdf.PdfReader$PageRefs.iteratePages(Unknown Source)
 at com.lowagie.text.pdf.PdfReader$PageRefs.readPages(Unknown Source)
 at com.lowagie.text.pdf.PdfReader$PageRefs.<init>(Unknown Source)
 at com.lowagie.text.pdf.PdfReader$PageRefs.<init>(Unknown Source)
 at com.lowagie.text.pdf.PdfReader.readPages(Unknown Source)
 at com.lowagie.text.pdf.PdfReader.readPdf(Unknown Source)
 at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)
 at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)
 at com.documentum.ajw.PDF.PDFconcat.concatPDFs(PDFconcat.java:64)
 
This is using the 1.4 version of iText.
 
Anyone have any ideas why this would happen?  I can open the PDF in Acrobat Standard 6.0 just fine...don't see anything obviously "wrong" with the file.
 
Thanks in advance,
AJ
 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem.

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message.