List of usage examples for org.apache.pdfbox.pdmodel.interactive.action PDActionURI PDActionURI
public PDActionURI()
From source file:net.bookinaction.utils.AnnotationMaker.java
License:Apache License
public PDAnnotationLink linkAnnotation(PDColor color, Rectangle2D.Float position, String url) { // Now add the link annotation, so the clickme works PDAnnotationLink txtLink = new PDAnnotationLink(); txtLink.setBorderStyle(borderULine); // Set the rectangle containing the link txtLink.setRectangle(new PDRectangle(position.x, position.y, position.width, position.height)); // add an action PDActionURI action = new PDActionURI(); action.setURI(url);/*from w w w . ja v a 2s .c om*/ txtLink.setAction(action); return txtLink; }