List of usage examples for org.apache.pdfbox.pdmodel.interactive.action PDActionGoTo PDActionGoTo
public PDActionGoTo()
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()); }