List of usage examples for org.apache.pdfbox.pdmodel.interactive.action PDActionURI setURI
public void setURI(String uri)
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); txtLink.setAction(action);//from w w w.ja v a2 s. c o m return txtLink; }