Class: LinkAnnot

PDFNet. LinkAnnot


new LinkAnnot()

A link annotation represents either a hypertext link to a destination elsewhere in the document or an action to be performed.

Extends

  • Annot

Members


<static> HighlightingMode

Properties:
Name Type Description
e_none number
e_invert number
e_outline number
e_push number

Methods


<static> create(doc, pos)

Creates a new Link annotation in the specified document.
Parameters:
Name Type Description
doc PDFNet.PDFDoc | PDFNet.SDFDoc | PDFNet.FDFDoc A document to which the Link annotation is added.
pos PDFNet.Rect A rectangle specifying the Link annotation's bounds in default user space units.
Returns:
A promise that resolves to a newly created blank Link annotation.
Type
Promise.<PDFNet.LinkAnnot>

<static> createFromAnnot(ann)

creates a Link annotation and initializes it using given annotation object.
Parameters:
Name Type Description
ann PDFNet.Annot Annot object used to initialize the Link annotation.
Returns:
A promise that resolves to an object of type: "PDFNet.LinkAnnot"
Type
Promise.<PDFNet.LinkAnnot>

<static> createFromObj( [d])

creates a Link annotation and initializes it using given Cos/SDF object.
Parameters:
Name Type Argument Description
d PDFNet.Obj <optional>
The Cos/SDF object to initialze the annotation with.
Returns:
A promise that resolves to an object of type: "PDFNet.LinkAnnot"
Type
Promise.<PDFNet.LinkAnnot>

getAction()

Returns the Action of the Link Annotation.
Returns:
A promise that resolves to an Action object of the Link annotation.
Type
Promise.<PDFNet.Action>

getHighlightingMode()

Returns the highlighting mode of this Link annotation.
Returns:
A promise that resolves to the highLighting mode as a value of the enum "HighlightingMode".
Type
Promise.<number>
Example
Return value enum:
<pre>
PDFNet.LinkAnnot.HighlightingMode = {
	e_none : 0
	e_invert : 1
	e_outline : 2
	e_push : 3
}
</pre>

getQuadPoint(idx)

Returns the QuadPoint located at a certain index of the QuadPoint array of the Link annotation.
Parameters:
Name Type Description
idx number The index of the QuadPoint, starts at zero and should be less than the return value of GetQuadPointCount().
Returns:
A promise that resolves to the QuadPoint located at a certain index of the QuadPoint array of the Link annotation.
Type
Promise.<PDFNet.QuadPoint>

getQuadPointCount()

Returns the number of QuadPoints in the 'QuadPoints' array of the Link annotation.
Returns:
A promise that resolves to the number of QuadPoints.
Type
Promise.<number>

removeAction()

removes this annotation's action.
Returns:
Type
Promise.<void>

setAction(action)

sets the Action of the Link Annotation. (Optional; PDF 1.1 )
Parameters:
Name Type Description
action PDFNet.Action An Action object that shall be associated with this Link annotation.
Returns:
Type
Promise.<void>

setHighlightingMode(value)

Sets the highlighting mode for this Link annotation. (Optional; PDF 1.2 )
Parameters:
Name Type Description
value number
PDFNet.LinkAnnot.HighlightingMode = {
	e_none : 0
	e_invert : 1
	e_outline : 2
	e_push : 3
}
the mode as a value of the enum "HighlightingMode".
Returns:
Type
Promise.<void>

setQuadPoint(idx, qp)

set the QuadPoint to be located at a certain index of the QuadPoint array of the Link annotation. (Optional; PDF 1.6 )
Parameters:
Name Type Description
idx number The index of the QuadPoint, starts at zero and should be less than the return value of GetQuadPointCount().
qp PDFNet.QuadPoint The QuadPoint to be stored in the annotation.
Returns:
Type
Promise.<void>