Example usage for org.apache.pdfbox.pdmodel.interactive.action PDActionGoTo PDActionGoTo

List of usage examples for org.apache.pdfbox.pdmodel.interactive.action PDActionGoTo PDActionGoTo

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel.interactive.action PDActionGoTo PDActionGoTo.

Prototype

public PDActionGoTo() 

Source Link

Document

Default constructor.

Usage

From source file:org.pdfsam.pdfbox.component.PDFBoxOutlineUtilsTest.java

License:Open Source License

@Test
public void toPageDestinationAction() {
    PDPageFitDestination destination = new PDPageFitDestination();
    destination.setPageNumber(5);//from   ww w  . j a  v  a 2s.c  om
    PDActionGoTo action = new PDActionGoTo();
    action.setDestination(destination);
    PDOutlineItem victim = new PDOutlineItem();
    victim.setAction(action);
    assertEquals(5, PDFBoxOutlineUtils.toPageDestination(victim, null).get().getPageNumber());
}