public class PdfLinkAnnotation extends PdfAnnotation
PdfAction
to be performed. See also ISO-320001 12.5.6.5, "Link Annotations".Modifier and Type | Field and Description |
---|---|
static PdfName |
Invert |
static PdfName |
None
Highlight modes.
|
static PdfName |
Outline |
static PdfName |
Push |
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
Modifier | Constructor and Description |
---|---|
protected |
PdfLinkAnnotation(PdfDictionary pdfObject)
Creates a new
PdfLinkAnnotation instance based on PdfDictionary
instance, that represents existing annotation object in the document. |
|
PdfLinkAnnotation(Rectangle rect)
Creates a new
PdfLinkAnnotation instance based on Rectangle
instance, that define the location of the annotation on the page in default user space units. |
Modifier and Type | Method and Description |
---|---|
PdfDictionary |
getAction()
An
PdfAction to perform, such as launching an application, playing a sound,
changing an annotation’s appearance state etc, when the annotation is activated. |
PdfDictionary |
getBorderStyle()
BS entry specifies a border style dictionary that has more settings than the array specified for the Border
entry (see
PdfAnnotation.getBorder() ). |
PdfObject |
getDestinationObject()
Gets the annotation destination as
PdfObject instance. |
PdfName |
getHighlightMode()
Gets the annotation highlight mode.
|
PdfArray |
getQuadPoints()
An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space.
|
PdfName |
getSubtype()
Gets a
PdfName which value is a subtype of this annotation. |
PdfDictionary |
getUriActionObject()
Gets the annotation URI action as
PdfDictionary . |
PdfLinkAnnotation |
removeAction()
Removes a
PdfAction from this annotation. |
PdfLinkAnnotation |
removeDestination()
Removes the annotation destination.
|
PdfLinkAnnotation |
setAction(PdfAction action)
Sets a
PdfAction to this annotation which will be performed when the annotation is activated. |
PdfLinkAnnotation |
setAction(PdfDictionary action)
Sets a
PdfDictionary representing action to this annotation which will be performed
when the annotation is activated. |
PdfLinkAnnotation |
setBorderStyle(PdfDictionary borderStyle)
Sets border style dictionary that has more settings than the array specified for the Border entry (
PdfAnnotation.getBorder() ). |
PdfLinkAnnotation |
setBorderStyle(PdfName style)
Setter for the annotation's preset border style.
|
PdfLinkAnnotation |
setDashPattern(PdfArray dashPattern)
Setter for the annotation's preset dashed border style.
|
PdfLinkAnnotation |
setDestination(PdfDestination destination)
Sets the annotation destination as
PdfDestination instance. |
PdfLinkAnnotation |
setDestination(PdfObject destination)
Sets the annotation destination as
PdfObject instance. |
PdfLinkAnnotation |
setHighlightMode(PdfName hlMode)
Sets the annotation highlight mode.
|
PdfLinkAnnotation |
setQuadPoints(PdfArray quadPoints)
Sets n quadrilaterals in default user space by passing an
PdfArray of 8 × n numbers. |
PdfLinkAnnotation |
setUriAction(PdfAction action)
Sets the annotation URI action as
PdfAction instance. |
PdfLinkAnnotation |
setUriAction(PdfDictionary action)
Sets the annotation URI action as
PdfDictionary instance. |
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, setTitle
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public static final PdfName None
public static final PdfName Invert
public static final PdfName Outline
public static final PdfName Push
protected PdfLinkAnnotation(PdfDictionary pdfObject)
PdfLinkAnnotation
instance based on PdfDictionary
instance, that represents existing annotation object in the document.pdfObject
- the PdfDictionary
representing annotation objectPdfAnnotation.makeAnnotation(PdfObject)
public PdfLinkAnnotation(Rectangle rect)
PdfLinkAnnotation
instance based on Rectangle
instance, that define the location of the annotation on the page in default user space units.rect
- the Rectangle
that define the location of the annotationpublic PdfName getSubtype()
PdfAnnotation
PdfName
which value is a subtype of this annotation.
See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.getSubtype
in class PdfAnnotation
public PdfObject getDestinationObject()
PdfObject
instance.
Destination shall be displayed when the annotation is activated. See also ISO-320001, Table 173.
PdfObject
instancepublic PdfLinkAnnotation setDestination(PdfObject destination)
PdfObject
instance.
Destination shall be displayed when the annotation is activated. See also ISO-320001, Table 173.
destination
- the destination to be set as PdfObject
instancePdfLinkAnnotation
instancepublic PdfLinkAnnotation setDestination(PdfDestination destination)
PdfDestination
instance.
Destination shall be displayed when the annotation is activated. See also ISO-320001, Table 173.
destination
- the destination to be set as PdfDestination
instancePdfLinkAnnotation
instancepublic PdfLinkAnnotation removeDestination()
Destination shall be displayed when the annotation is activated. See also ISO-320001, Table 173.
PdfLinkAnnotation
instancepublic PdfDictionary getAction()
PdfAction
to perform, such as launching an application, playing a sound,
changing an annotation’s appearance state etc, when the annotation is activated.PdfDictionary
which defines the characteristics and behaviour of an actionpublic PdfLinkAnnotation setAction(PdfDictionary action)
PdfDictionary
representing action to this annotation which will be performed
when the annotation is activated.action
- PdfDictionary
that represents action to set to this annotationPdfLinkAnnotation
instancepublic PdfLinkAnnotation setAction(PdfAction action)
PdfAction
to this annotation which will be performed when the annotation is activated.action
- PdfAction
to set to this annotationPdfLinkAnnotation
instancepublic PdfLinkAnnotation removeAction()
PdfAction
from this annotation.PdfLinkAnnotation
instancepublic PdfName getHighlightMode()
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.
public PdfLinkAnnotation setHighlightMode(PdfName hlMode)
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.
hlMode
- the name of visual effect to be setPdfLinkAnnotation
instancepublic PdfDictionary getUriActionObject()
PdfDictionary
.
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.
public PdfLinkAnnotation setUriAction(PdfDictionary action)
PdfDictionary
instance.
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.
action
- the action to be setPdfLinkAnnotation
instancepublic PdfLinkAnnotation setUriAction(PdfAction action)
PdfAction
instance.
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.
action
- the action to be setPdfLinkAnnotation
instancepublic PdfArray getQuadPoints()
PdfArray
of 8 × n numbers specifying the coordinates of n quadrilaterals.public PdfLinkAnnotation setQuadPoints(PdfArray quadPoints)
PdfArray
of 8 × n numbers.
Quadrilaterals are used to define regions inside annotation rectangle
in which the link annotation should be activated.quadPoints
- an PdfArray
of 8 × n numbers specifying the coordinates of n quadrilaterals.PdfLinkAnnotation
instance.public PdfDictionary getBorderStyle()
PdfAnnotation.getBorder()
). If an annotation dictionary includes the BS entry, then the Border
entry is ignored. If annotation includes AP (see PdfAnnotation.getAppearanceDictionary()
) it takes
precedence over the BS entry. For more info on BS entry see ISO-320001, Table 166.PdfDictionary
which is a border style dictionary or null if it is not specified.public PdfLinkAnnotation setBorderStyle(PdfDictionary borderStyle)
PdfAnnotation.getBorder()
).
See ISO-320001, Table 166 and getBorderStyle()
for more info.borderStyle
- a border style dictionary specifying the line width and dash pattern that shall be used
in drawing the annotation’s border.PdfLinkAnnotation
instance.public PdfLinkAnnotation setBorderStyle(PdfName style)
PdfAnnotation.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.
style
- The new value for the annotation's border style.PdfLinkAnnotation
instance.getBorderStyle()
public PdfLinkAnnotation setDashPattern(PdfArray dashPattern)
PdfAnnotation.STYLE_DASHED
style was used for the annotation border style (see setBorderStyle(PdfName)
.
See ISO-320001 8.4.3.6, "Line Dash Pattern" for the format in which dash pattern shall be specified.dashPattern
- a dash array defining a pattern of dashes and gaps that
shall be used in drawing a dashed border.PdfLinkAnnotation
instance.Copyright © 1998–2023 Apryse Group NV. All rights reserved.