PdfObjectTreeNode catalog = factory.getChildNode(trailer, PdfName.ROOT);
PdfPagesTreeNode pages = (PdfPagesTreeNode)factory.getChildNode(catalog, PdfName.PAGES);
if (pages == null) {
return;
}
Enumeration<PdfObjectTreeNode> p = pages.depthFirstEnumeration();
PdfObjectTreeNode child;
StringBuffer buf;
while (p.hasMoreElements()) {
child = p.nextElement();
if (child instanceof PdfPageTreeNode) {