PdfObject contents = PdfReader.getPdfObject(page.get(PdfName.CONTENTS));
if (contents != null) {
this.add(new StreamTreeNode(contents, "Content"));
if (contents.isStream()) {
PRStream page_content = (PRStream) contents;
Set s = page_content.getKeys();
Iterator it = s.iterator();
while (it.hasNext()) {
Object obj = it.next();
System.out.println("Field:" + obj);
Object value = PdfReader.getPdfObject(page_content.get((PdfName) obj));
System.out.println("Value:" + value);
}
}
}
}