/** * This will set the previous URI action, in case it's needed. * * @return The previous URI. */ public PDActionURI getPreviousURI() { COSBase base = getCOSObject().getDictionaryObject("PA"); if (base instanceof COSDictionary) { return new PDActionURI((COSDictionary) base); } return null; }
break; case PDActionURI.SUB_TYPE: retval = new PDActionURI(action); break; case PDActionNamed.SUB_TYPE:
/** * This will set the previous URI action, in case it's needed. * * @return The previous URI. */ public PDActionURI getPreviousURI() { COSBase base = getCOSObject().getDictionaryObject("PA"); if (base instanceof COSDictionary) { return new PDActionURI((COSDictionary) base); } return null; }
/** * This will set the previous URI action, in case it's needed. * * @return The previous URI. */ public PDActionURI getPreviousURI() { COSBase base = getCOSObject().getDictionaryObject("PA"); if (base instanceof COSDictionary) { return new PDActionURI((COSDictionary) base); } return null; }
PDActionURI action = new PDActionURI(); action.setURI("http://pdfbox.apache.org"); txtLink.setAction(action);
retval = new PDActionURI( action );
private PDRectangle addAnnotationLinkRectangle(final float x, final float y, final float width, final float height, final String linkURL) throws IOException { final float startingY = checkYAndSwitchPage(y, height); final PDAnnotationLink txtLink = new PDAnnotationLink(); final PDRectangle position = new PDRectangle(); position.setLowerLeftX(x); position.setLowerLeftY(startingY); position.setUpperRightX(x + width); position.setUpperRightY(startingY + height); txtLink.setRectangle(position); final PDActionURI action = new PDActionURI(); action.setURI(linkURL); txtLink.setAction(action); currentPage.getAnnotations().add(txtLink); return new PDRectangle(x, startingY, width, height); }
PDActionURI uriAct = new PDActionURI(); uriAct.setURI(uri);
PDActionURI uriAct = new PDActionURI(); uriAct.setURI(uri);
PDActionURI uriAct = new PDActionURI(); uriAct.setURI(uri);
PDBorderStyleDictionary borderULine = new PDBorderStyleDictionary(); borderULine.setStyle(PDBorderStyleDictionary.STYLE_UNDERLINE); borderULine.setWidth(1); PDAnnotationLink txtLink = new PDAnnotationLink(); txtLink.setBorderStyle(borderULine); // Set the rectangle containing the link textWidth = font.getStringWidth("Click here") / 1000 * xscale; position = new PDRectangle(); position.setLowerLeftX(...); position.setLowerLeftY(...); position.setUpperRightX(...); position.setUpperRightY(...); txtLink.setRectangle(position); // add an action PDActionURI action = new PDActionURI(); action.setURI("http://pdfbox.apache.org"); txtLink.setAction(action); annotations.add(txtLink);
break; case PDActionURI.SUB_TYPE: retval = new PDActionURI(action); break; case PDActionNamed.SUB_TYPE:
PDActionURI action = new PDActionURI(); action.setURI(currFol.getName() + "/" + currDoc.getName());
PDActionURI action = new PDActionURI(); action.setURI("http://pdfbox.apache.org"); txtLink.setAction(action);