Example usage for org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination PDPageDestination getPage

List of usage examples for org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination PDPageDestination getPage

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination PDPageDestination getPage.

Prototype

public PDPage getPage() 

Source Link

Document

This will get the page for this destination.

Usage

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
    }
}