// 1. Showing basic page information...
System.out.println(" Index (calculated): " + page.getIndex() + " (should be " + index + ")");
System.out.println(" ID: " + ((PdfReference)page.getBaseObject()).getId());
PdfDictionary pageDictionary = page.getBaseDataObject();
System.out.println(" Dictionary entries:");
for(PdfName key : pageDictionary.keySet())
{System.out.println(" " + key.getValue());}
// 2. Showing page contents information...
Contents contents = page.getContents();
System.out.println(" Content objects count: " + contents.size());