Dean Krueger wrote:
> Bruno;
>  
> Thanks for the example on Page Labels, in trying it I am getting a 
> java.lang.ClassCastException when I try running with any PDF other than 
> the one you supplied with the demo. Looking at the PDF I am trying to 
> get the page info from, has page numbers defined as I can see them in 
> Acrobat.
>  
> Any guess as to what could be causing this?

Yes,
I am retrieving PdfObjects from the catalog,
but because the PDF I inspected is iText generared,
I know what type these objects are: a PdfNumber,
a PdfDictionary,...
PDF that are found in the wild can contain other
objects (for instance a reference to a PdfDictionary
instead of the actual PdfDictionary).
In this case, it's probably better to get the keys
and values as PdfObject instances and then ask the
object what type it is.
br,
Bruno

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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