/** * Indicates if the document has any outlines * * @return {@code true}, if there are outlines and {@code false} otherwise. */ public boolean hasOutlines() { return catalog.hasOutlines(); }
/** * This method removes all outlines associated with a given page * * @param page */ void removeOutlines(PdfPage page) { if (getDocument().getWriter() == null) { return; } if (hasOutlines()) { getOutlines(false); if (pagesWithOutlines.size() > 0) { if (pagesWithOutlines.get(page.getPdfObject()) != null) { for (PdfOutline outline : pagesWithOutlines.get(page.getPdfObject())) { outline.removeOutline(); } } } } }