List of usage examples for com.itextpdf.text.pdf PdfTransition PdfTransition
public PdfTransition(int type, int duration)
Transition
. From source file:org.sejda.impl.itext5.component.PdfStamperHandler.java
License:Open Source License
/** * Applies the given transition to the given page. * //from w w w . ja va2 s . c om * @param page * @param transition */ public void setTransition(Integer page, PdfPageTransition transition) { Integer transitionStyle = getTransition(transition.getStyle()); if (transitionStyle != null) { stamper.setDuration(transition.getDisplayDuration(), page); stamper.setTransition(new PdfTransition(transitionStyle, transition.getTransitionDuration()), page); } else { LOG.warn("Transition {} not applied to page {}. Not supported by iText.", transition.getStyle(), page); } }