Show / Hide Table of Contents

# Class Link

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

##### Inheritance

object
Annot
Link

##### Implements

IDisposable

##### Inherited Members

Annot.GetTriggerAction(Annot.EventType)
Annot.Create(SDFDoc, Annot.Type, Rect)
Annot.op_Assign(Annot)
Annot.Equals(object)
Annot.IsValid()
Annot.GetSDFObj()
Annot.GetType()
Annot.IsMarkup()
Annot.GetRect()
Annot.GetVisibleContentBox()
Annot.SetRect(Rect)
Annot.GetContents()
Annot.SetContents(string)
Annot.GetPage()
Annot.SetPage(Page)
Annot.GetUniqueID()
Annot.SetUniqueID(string)
Annot.GetDate()
Annot.SetDate(Date)
Annot.GetFlag(Annot.Flag)
Annot.SetFlag(Annot.Flag, bool)
Annot.GetBorderStyle()
Annot.SetBorderStyle(Annot.BorderStyle)
Annot.GetAppearance(Annot.AnnotationState, string)
Annot.GetAppearance(Annot.AnnotationState)
Annot.GetAppearance()
Annot.SetAppearance(Obj, Annot.AnnotationState, string)
Annot.SetAppearance(Obj, Annot.AnnotationState)
Annot.SetAppearance(Obj)
Annot.RemoveAppearance(Annot.AnnotationState, string)
Annot.RemoveAppearance(Annot.AnnotationState)
Annot.RemoveAppearance()
Annot.Flatten(Page)
Annot.GetActiveAppearanceState()
Annot.SetActiveAppearanceState(string)
Annot.GetColorAsRGB()
Annot.GetColorAsCMYK()
Annot.GetColorAsGray()
Annot.GetColorCompNum()
Annot.SetColor(ColorPt)
Annot.SetColor(ColorPt, int)
Annot.GetStructParent()
Annot.SetStructParent(int)
Annot.GetOptionalContent()
Annot.SetOptionalContent(Obj)
Annot.Resize(Rect)
Annot.GetRotation()
Annot.SetRotation(int)
Annot.RefreshAppearance(RefreshOptions)
Annot.RefreshAppearance()
Annot.GetCustomData(string)
Annot.SetCustomData(string, string)
Annot.DeleteCustomData(string)
Annot.Dispose()
object.ToString()
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.MemberwiseClone()

###### Namespace: pdftron.PDF.Annots

###### Assembly: PDFNet.dll

##### Syntax

    public class Link : Annot, IDisposable

### Constructors

#### Link(Annot)

Creates a Link annotation and initialize it using given annotation object.

##### Declaration

    public Link(Annot ann)

##### Parameters

Type | Name | Description
--- | --- | ---
Annot | ann | the annot

##### Remarks

The constructor does not copy any data, but is instead the logical equivalent of a type cast.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### Link(Obj)

Creates a Link annotation and initialize it using given Cos/SDF object.

##### Declaration

    public Link(Obj d)

##### Parameters

Type | Name | Description
--- | --- | ---
Obj | d | the d

##### Remarks

The constructor does not copy any data, but is instead the logical equivalent of a type cast.

### Methods

#### Create(SDFDoc, Rect)

Creates a new Link annotation.

##### Declaration

    public static Link Create(SDFDoc doc, Rect pos)

##### Parameters

Type | Name | Description
--- | --- | ---
SDFDoc | doc | A document to which the annotation is added.
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates.

##### Returns

Type | Description
--- | ---
Link | A new Link annotation.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### Create(SDFDoc, Rect, Action)

Creates a new Link annotation.

##### Declaration

    public static Link Create(SDFDoc doc, Rect pos, Action action)

##### Parameters

Type | Name | Description
--- | --- | ---
SDFDoc | doc | A document to which the annotation is added.
Rect | pos | A rectangle specifying the annotation's bounds, specified in user space coordinates.
Action | action | Action for the link annotation.

##### Returns

Type | Description
--- | ---
Link | A new Link annotation.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### Dispose(bool)

##### Declaration

    [HandleProcessCorruptedStateExceptions]
    protected override void Dispose(bool A_0)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | A_0 |

##### Overrides

Annot.Dispose(bool)

#### GetAction()

Gets the Action of the Linked Annotation.

##### Declaration

    public Action GetAction()

##### Returns

Type | Description
--- | ---
Action | An Action object that denotes the action of the linked annotation.

##### Remarks

The return value is an action that shall be performed when the link annotation is activated

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetHighlightingMode()

Gets the HighlightingMode Linked Annotation.

##### Declaration

    public Link.HighlightingMode GetHighlightingMode()

##### Returns

Type | Description
--- | ---
Link.HighlightingMode | The HighLighting mode represented as an entry of the enum "HighlightingMode".

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetQuadPoint(int)

Gets the QuadPoint located at a certain index of the QuadPoint array of the Link annotation.

##### Declaration

    public QuadPoint GetQuadPoint(int idx)

##### Parameters

Type | Name | Description
--- | --- | ---
int | idx | the idx

##### Returns

Type | Description
--- | ---
QuadPoint | The QuadPoint located at a certain index of the QuadPoint array of the Link annotation.

##### Remarks

An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be activated. The coordinates specifying the four vertices of the quadrilateral in counterclockwise order. For orientation purposes, such as when applying an underline border style, the bottom of a quadrilateral is the line formed by p1 and p2 of the QuadPoint. QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### GetQuadPointCount()

Gets the number of QuadPoints in the QuadPoints array of the Link annotation.

##### Declaration

    public int GetQuadPointCount()

##### Returns

Type | Description
--- | ---
int | The number of QuadPoints.

##### Remarks

An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be activated. The coordinates specifying the four vertices of the quadrilateral in counterclockwise order. For orientation purposes, such as when applying an underline border style, the bottom of a quadrilateral is the line formed by p1 and p2 of the QuadPoint. QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### RemoveAction()

Removes a link annotation's action.

##### Declaration

    public void RemoveAction()

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetAction(Action)

Sets the Action of the Linked Annotation. (Optional; PDF'1.1 )

##### Declaration

    public void SetAction(Action action)

##### Parameters

Type | Name | Description
--- | --- | ---
Action | action | An Action object that denotes the action of the linked annotation.

##### Remarks

The parameter is an action that shall be performed when the link annotation is activated

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetHighlightingMode(HighlightingMode)

Sets the HighlightingMode Linked Annotation. (Optional; PDF'1.2 )

##### Declaration

    public void SetHighlightingMode(Link.HighlightingMode mode)

##### Parameters

Type | Name | Description
--- | --- | ---
Link.HighlightingMode | mode | The HighLighting mode represented as an entry of the enum "HighlightingMode".

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### SetQuadPoint(int, QuadPoint)

Set the QuadPoint to be located at a certain index of the QuadPoint array of the Link annotation. (Optional; PDF'1.6 )

##### Declaration

    public void SetQuadPoint(int idx, QuadPoint qp)

##### Parameters

Type | Name | Description
--- | --- | ---
int | idx | the idx
QuadPoint | qp | the qp

##### Remarks

An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be activated. The coordinates specifying the four vertices of the quadrilateral in counterclockwise order. For orientation purposes, such as when applying an underline border style, the bottom of a quadrilateral is the line formed by p1 and p2 of the QuadPoint. QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

### Implements

IDisposable