Class PdfLinkAnnotation
PdfAction to be performed. See also ISO-320001 12.5.6.5, "Link Annotations".
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PdfNamestatic final PdfNameHighlight modes.static final PdfNamestatic final PdfNameFields inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
Accepted, Canceled, Completed, HIDDEN, HIGHLIGHT_INVERT, HIGHLIGHT_NONE, HIGHLIGHT_OUTLINE, HIGHLIGHT_PUSH, HIGHLIGHT_TOGGLE, INVISIBLE, LOCKED, LOCKED_CONTENTS, Marked, MarkedModel, NO_ROTATE, NO_VIEW, NO_ZOOM, page, PRINT, READ_ONLY, Rejected, ReviewModel, STYLE_BEVELED, STYLE_DASHED, STYLE_INSET, STYLE_SOLID, STYLE_UNDERLINE, TOGGLE_NO_VIEW, Unmarked -
Constructor Summary
ConstructorsModifierConstructorDescriptionPdfLinkAnnotation(Rectangle rect) Creates a newPdfLinkAnnotationinstance based onRectangleinstance, that define the location of the annotation on the page in default user space units.protectedPdfLinkAnnotation(PdfDictionary pdfObject) Creates a newPdfLinkAnnotationinstance based onPdfDictionaryinstance, that represents existing annotation object in the document. -
Method Summary
Modifier and TypeMethodDescriptionAnPdfActionto perform, such as launching an application, playing a sound, changing an annotation’s appearance state etc, when the annotation is activated.BS entry specifies a border style dictionary that has more settings than the array specified for the Border entry (seePdfAnnotation.getBorder()).Gets the annotation destination asPdfObjectinstance.Gets the annotation highlight mode.An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space.Gets aPdfNamewhich value is a subtype of this annotation.Gets the annotation URI action asPdfDictionary.Removes aPdfActionfrom this annotation.Removes the annotation destination.Sets aPdfActionto this annotation which will be performed when the annotation is activated.setAction(PdfDictionary action) Sets aPdfDictionaryrepresenting action to this annotation which will be performed when the annotation is activated.setBorderStyle(PdfDictionary borderStyle) Sets border style dictionary that has more settings than the array specified for the Border entry (PdfAnnotation.getBorder()).setBorderStyle(PdfName style) Setter for the annotation's preset border style.setDashPattern(PdfArray dashPattern) Setter for the annotation's preset dashed border style.setDestination(PdfDestination destination) Sets the annotation destination asPdfDestinationinstance.setDestination(PdfObject destination) Sets the annotation destination asPdfObjectinstance.setHighlightMode(PdfName hlMode) Sets the annotation highlight mode.setQuadPoints(PdfArray quadPoints) Sets n quadrilaterals in default user space by passing anPdfArrayof 8 × n numbers.setUriAction(PdfAction action) Sets the annotation URI action asPdfActioninstance.setUriAction(PdfDictionary action) Sets the annotation URI action asPdfDictionaryinstance.Methods inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
addAssociatedFile, flush, getAppearanceDictionary, getAppearanceObject, getAppearanceState, getAssociatedFiles, getBlendMode, getBorder, getColorObject, getContents, getDate, getDownAppearanceObject, getFlags, getLang, getName, getNonStrokingOpacity, getNormalAppearanceObject, getPage, getPageObject, getRectangle, getRolloverAppearanceObject, getStrokingOpacity, getStructParentIndex, getTitle, hasFlag, isWrappedObjectMustBeIndirect, makeAnnotation, put, remove, resetFlag, setAppearance, setAppearance, setAppearanceState, setBlendMode, setBorder, setBorder, setColor, setColor, setColor, setContents, setContents, setDate, setDownAppearance, setDownAppearance, setFlag, setFlags, setLang, setLayer, setName, setNonStrokingOpacity, setNormalAppearance, setNormalAppearance, setPage, setRectangle, setRolloverAppearance, setRolloverAppearance, setStrokingOpacity, setStructParentIndex, setTitleMethods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
Field Details
-
None
Highlight modes. -
Invert
-
Outline
-
Push
-
-
Constructor Details
-
PdfLinkAnnotation
Creates a newPdfLinkAnnotationinstance based onPdfDictionaryinstance, that represents existing annotation object in the document.- Parameters:
-
pdfObject- thePdfDictionaryrepresenting annotation object - See Also:
-
PdfLinkAnnotation
Creates a newPdfLinkAnnotationinstance based onRectangleinstance, that define the location of the annotation on the page in default user space units.- Parameters:
-
rect- theRectanglethat define the location of the annotation
-
-
Method Details
-
getSubtype
Description copied from class:PdfAnnotationGets aPdfNamewhich value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.- Specified by:
-
getSubtypein classPdfAnnotation - Returns:
- subtype of this annotation.
-
getDestinationObject
Gets the annotation destination asPdfObjectinstance.Destination shall be displayed when the annotation is activated. See also ISO-320001, Table 173.
- Returns:
-
the annotation destination as
PdfObjectinstance
-
setDestination
Sets the annotation destination asPdfObjectinstance.Destination shall be displayed when the annotation is activated. See also ISO-320001, Table 173.
- Parameters:
-
destination- the destination to be set asPdfObjectinstance - Returns:
-
this
PdfLinkAnnotationinstance
-
removeDestination
Removes the annotation destination.Destination shall be displayed when the annotation is activated. See also ISO-320001, Table 173.
- Returns:
-
this
PdfLinkAnnotationinstance
-
getAction
AnPdfActionto perform, such as launching an application, playing a sound, changing an annotation’s appearance state etc, when the annotation is activated.- Returns:
-
PdfDictionarywhich defines the characteristics and behaviour of an action
-
setAction
Sets aPdfDictionaryrepresenting action to this annotation which will be performed when the annotation is activated.- Parameters:
-
action-PdfDictionarythat represents action to set to this annotation - Returns:
-
this
PdfLinkAnnotationinstance
-
setAction
Sets aPdfActionto this annotation which will be performed when the annotation is activated.- Parameters:
-
action-PdfActionto set to this annotation - Returns:
-
this
PdfLinkAnnotationinstance
-
removeAction
Removes aPdfActionfrom this annotation.- Returns:
-
this
PdfLinkAnnotationinstance
-
getHighlightMode
Gets the annotation highlight mode.The annotation’s highlighting mode is the visual effect that shall be used when the mouse button is pressed or held down inside its active area. See also ISO-320001, Table 173.
- Returns:
- the name of visual effect
-
setHighlightMode
Sets the annotation highlight mode.The annotation’s highlighting mode is the visual effect that shall be used when the mouse button is pressed or held down inside its active area. See also ISO-320001, Table 173.
- Parameters:
-
hlMode- the name of visual effect to be set - Returns:
-
this
PdfLinkAnnotationinstance
-
getUriActionObject
Gets the annotation URI action asPdfDictionary.When Web Capture (see ISO-320001 14.10, “Web Capture”) changes an annotation from a URI to a go-to action, it uses this entry to save the data from the original URI action so that it can be changed back in case the target page for the go-to action is subsequently deleted. See also ISO-320001, Table 173.
- Returns:
- the URI action as pdfDictionary
-
setUriAction
Sets the annotation URI action asPdfDictionaryinstance.When Web Capture (see ISO-320001 14.10, “Web Capture”) changes an annotation from a URI to a go-to action, it uses this entry to save the data from the original URI action so that it can be changed back in case the target page for the go-to action is subsequently deleted. See also ISO-320001, Table 173.
- Parameters:
-
action- the action to be set - Returns:
-
this
PdfLinkAnnotationinstance
-
setUriAction
Sets the annotation URI action asPdfActioninstance.A URI action (see ISO-320001 12.6.4.7, “URI Actions”) formerly associated with this annotation. When Web Capture (see ISO-320001 14.10, “Web Capture”) changes an annotation from a URI to a go-to action, it uses this entry to save the data from the original URI action so that it can be changed back in case the target page for the go-to action is subsequently deleted. See also ISO-320001, Table 173.
- Parameters:
-
action- the action to be set - Returns:
-
this
PdfLinkAnnotationinstance
-
getQuadPoints
An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space. Quadrilaterals are used to define regions inside annotation rectangle in which the link annotation should be activated.- Returns:
-
an
PdfArrayof 8 × n numbers specifying the coordinates of n quadrilaterals.
-
setQuadPoints
Sets n quadrilaterals in default user space by passing anPdfArrayof 8 × n numbers. Quadrilaterals are used to define regions inside annotation rectangle in which the link annotation should be activated.- Parameters:
-
quadPoints- anPdfArrayof 8 × n numbers specifying the coordinates of n quadrilaterals. - Returns:
-
this
PdfLinkAnnotationinstance.
-
getBorderStyle
BS entry specifies a border style dictionary that has more settings than the array specified for the Border entry (seePdfAnnotation.getBorder()). If an annotation dictionary includes the BS entry, then the Border entry is ignored. If annotation includes AP (seePdfAnnotation.getAppearanceDictionary()) it takes precedence over the BS entry. For more info on BS entry see ISO-320001, Table 166.- Returns:
-
PdfDictionarywhich is a border style dictionary or null if it is not specified.
-
setBorderStyle
Sets border style dictionary that has more settings than the array specified for the Border entry (PdfAnnotation.getBorder()). See ISO-320001, Table 166 andgetBorderStyle()for more info.- Parameters:
-
borderStyle- a border style dictionary specifying the line width and dash pattern that shall be used in drawing the annotation’s border. - Returns:
-
this
PdfLinkAnnotationinstance.
-
setBorderStyle
Setter for the annotation's preset border style. Possible values arePdfAnnotation.STYLE_SOLID- A solid rectangle surrounding the annotation.PdfAnnotation.STYLE_DASHED- A dashed rectangle surrounding the annotation.PdfAnnotation.STYLE_BEVELED- A simulated embossed rectangle that appears to be raised above the surface of the page.PdfAnnotation.STYLE_INSET- A simulated engraved rectangle that appears to be recessed below the surface of the page.PdfAnnotation.STYLE_UNDERLINE- A single line along the bottom of the annotation rectangle.
- Parameters:
-
style- The new value for the annotation's border style. - Returns:
-
this
PdfLinkAnnotationinstance. - See Also:
-
setDashPattern
Setter for the annotation's preset dashed border style. This property has affect only ifPdfAnnotation.STYLE_DASHEDstyle was used for the annotation border style (seesetBorderStyle(PdfName). See ISO-320001 8.4.3.6, "Line Dash Pattern" for the format in which dash pattern shall be specified.- Parameters:
-
dashPattern- a dash array defining a pattern of dashes and gaps that shall be used in drawing a dashed border. - Returns:
-
this
PdfLinkAnnotationinstance.
-