public Integer criteriaBookmarkExistsInReport(String bookmarkTitle) {

        //This method finds the associated bookmark
        if (controller != null) {
            //From: http://www.icesoft.org/JForum/posts/list/13433.page
            //Get the bookmarks (icepdf calls them outline items)


            if (outlines != null) {
                item = outlines.getRootOutlineItem();
            }
            if (item != null) {
                OutlineItemTreeNode outlineItemTreeNode = new OutlineItemTreeNode(item);
                outlineItemTreeNode.getChildCount();  // Added this line
                Enumeration depthFirst = outlineItemTreeNode.depthFirstEnumeration();
                // find the node you need


                //Loop through the bookmarks looking for a matching title
                //The index of the bookmark that we want to navigate to
                Integer bookMark = 0;
                Integer numDocBookmarks = item.getSubItemCount();
                String bookMarkName; //this is to store the name of the item, from outlines, which are the bookmarks that the computer sees in the PDF document

                //Bookmarks in the PDF tend to have spaces added onto the end of the name, so that is why the replace and trim methods are used
                while (bookMark < numDocBookmarks) {
                    bookMarkName = item.getSubItem(bookMark).getTitle().replace("?", "").trim();
                    //System.out.println("|" + bookMarkName + "/" + bookmarkTitle.toString() + "|");
                    if (bookMarkName.equals(bookmarkTitle.toString()) || bookMarkName.equals(bookmarkTitle.toString() + " ") || bookMarkName.equals(bookmarkTitle.toString().replace('_', ' ')) || bookMarkName.equals(bookmarkTitle.toString().replace('_', ' ') + " ")) {
                        break;
                    }
                    bookMark++;
                    //TODO: Return if bookmark not found
                }

                if (bookMark >= numDocBookmarks) {
                    //System.out.println("There is no bookmark in the document for the given attribute");
                    return -1;
                } else {
                    return bookMark;
                }
            } else {
                //the report does not exist anyway, so no controller was created, return -1
                return -1;
            }
        } else {
            //the report does not exist anyway, so no controller was created, return -1
            return -1;
        }
    }