List bookmarks = SimpleBookmark.getBookmark(pdfReader);
ByteArrayOutputStream out = new ByteArrayOutputStream();
SimpleBookmark.exportToXML(bookmarks, out, "UTF-8", false);
ByteArrayInputStream input = new ByteArrayInputStream(out.toByteArray());
int maxDepth = PdfUtility.getMaxBookmarksDepth(input);
input.reset();
if (bLevel <= maxDepth) {
SAXReader reader = new SAXReader();
org.dom4j.Document document = reader.read(input);
// head node
String headBookmarkXQuery = "/Bookmark/Title[@Action=\"GoTo\"]";