List of usage examples for org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination PDPageDestination getPage
public PDPage getPage()
From source file:org.pdfmetamodifier.OutlineHelper.java
License:Apache License
private static Integer getOutlinesPageNumber(final PDPageDestination pageDestination, final PDPageTree pages) { return pages.indexOf(pageDestination.getPage()) + 1; }
From source file:org.pdfsam.pdfbox.PDFBoxOutlineLevelsHandler.java
License:Open Source License
private void addPageIfValid(OutlinePageDestinations destinations, PDPageDestination destination, String title) { if (isNotBlank(title)) { Matcher matcher = titleMatchingPattern.matcher(title); if (matcher.matches()) { destinations.addPage(pages.indexOf(destination.getPage()), title); }//from w w w.j av a 2 s .c om } }