On 30/10/2012 19:10, kent jiang wrote:
> I'm trying to retrieve a PDF file from it /Catalog object, which means
> from the beginning. Everything's fine till I reach the /Pages object
> which contain the key /Kids, which should be an array of object, and
> each of them contain info of particular page. What I want is to get
> this array out so that I can continue my retrieve. Is any one has any
> idea? Any reply will be appreciated!
Try this:
PdfArray kids = pages.getAsArray(PdfName.KIDS);
This gives you an array over which you can loop.
However: if you want to retrieve the page dictionaries of every page,
you may want to try an easier way:
PdfReader reader = new PdfReader(src);
int n = reader.getNumberOfPages();
for (int i = 1; i <= n; i++) {
PdfDictionary pageDict = reader.getPageN(i);
// do stuff with pageDict
}
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php