GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfLinkAnnotation Class

    Namespace:
    GemBox.Pdf.Annotations
    Assembly:
    GemBox.Pdf.dll

    A link annotation represents either a hypertext link to a destination elsewhere in the document (see 12.3.2, "Destinations") or an action to be performed (12.6, "Actions").

    • C#
    • VB.NET
    public sealed class PdfLinkAnnotation : PdfAnnotation
    Public NotInheritable Class PdfLinkAnnotation
        Inherits PdfAnnotation
    Inheritance:
    System.Object
    PdfObject
    PdfAnnotation
    PdfLinkAnnotation

    Properties

    Actions

    (Optional; PDF 1.1) An action that shall be performed when the link annotation is activated (see 12.6, "Actions").

    • C#
    • VB.NET
    public PdfActionCollection Actions { get; }
    Public ReadOnly Property Actions As PdfActionCollection
    Property Value
    PdfActionCollection

    An action that shall be performed when the link annotation is activated.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.6.5 Link Annotations'

    AnnotationType

    Gets the Link value.

    • C#
    • VB.NET
    public override PdfAnnotationType AnnotationType { get; }
    Public Overrides ReadOnly Property AnnotationType As PdfAnnotationType
    Property Value
    PdfAnnotationType

    The Link value.

    Overrides
    PdfAnnotation.AnnotationType

    Appearance

    Gets the appearance settings for this PdfLinkAnnotation.

    • C#
    • VB.NET
    public PdfLinkAppearance Appearance { get; }
    Public ReadOnly Property Appearance As PdfLinkAppearance
    Property Value
    PdfLinkAppearance

    The appearance settings for this PdfLinkAnnotation.

    Destination

    (Optional; not permitted if an A entry is present) The destination that shall be displayed when the annotation is activated (see 12.3.2, "Destinations").

    • C#
    • VB.NET
    public PdfDestination Destination { get; set; }
    Public Property Destination As PdfDestination
    Property Value
    PdfDestination

    The destination that shall be displayed when the annotation is activated.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.6.5 Link Annotations'

    DestinationName

    (Optional; not permitted if an A entry is present) The named destination that shall be displayed when the annotation is activated (see 12.3.2.3, "Named Destinations").

    • C#
    • VB.NET
    public string DestinationName { get; set; }
    Public Property DestinationName As String
    Property Value
    System.String

    The named destination that shall be displayed when the annotation is activated.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.6.5 Link Annotations'

    HighlightMode

    (Optional; PDF 1.2) The annotation's highlighting mode, the visual effect that shall be used when the mouse button is pressed or held down inside its active area.

    Default value: Invert.

    • C#
    • VB.NET
    public PdfHighlightMode HighlightMode { get; set; }
    Public Property HighlightMode As PdfHighlightMode
    Property Value
    PdfHighlightMode

    The annotation's highlighting mode, the visual effect that shall be used when the mouse button is pressed or held down inside its active area.

    Exceptions
    System.NotSupportedException

    Value Unknown of enumeration PdfHighlightMode is not supported in the requested operation.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.6.5 Link Annotations'

    Quads

    (Optional; PDF 1.6) An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be activated.

    If this entry is not present or the conforming reader does not recognize it, the region specified by the Bounds entry should be used. Quads shall be ignored if any coordinate in the array lies outside the region specified by Bounds.

    • C#
    • VB.NET
    public PdfCollection<PdfQuad> Quads { get; }
    Public ReadOnly Property Quads As PdfCollection(Of PdfQuad)
    Property Value
    PdfCollection<PdfQuad>

    An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be activated.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.6.5 Link Annotations'

    Methods

    SetDestination(PdfPage, PdfDestinationViewType, Nullable<Double>[])

    Sets the explicit destination that shall be displayed when the annotation is activated (see 12.3.2.2, "Explicit Destinations").

    parameters represent the following values depending on the viewType parameter:

    • FitRectangle

      Left, Bottom, Right and Top.

    • LeftTopZoom

      Left, Top and Zoom.

    • FitPageVertical and FitContentVertical Left.
    • FitPageHorizontal and FitContentHorizontal Top.
    • FitPage and FitContentNone.

    • C#
    • VB.NET
    public PdfDestination SetDestination(PdfPage page, PdfDestinationViewType viewType, params double? [] parameters)
    Public Function SetDestination(page As PdfPage, viewType As PdfDestinationViewType, ParamArray parameters As Double?()) As PdfDestination
    Parameters
    page
    PdfPage

    The page that shall be displayed when the annotation is activated.

    viewType
    PdfDestinationViewType

    Type of the view.

    parameters
    System.Nullable<System.Double>[]

    The parameters of the view.

    Returns
    PdfDestination

    The explicit destination that shall be displayed when the annotation is activated.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.5.6.5 Link Annotations'

    Inherited Properties

    AssociatedFiles

    (Optional; PDF 2.0) An array of one or more PdfFileSpecifications which denote the associated files for this PdfAnnotation.

    (Inherited from PdfAnnotation)

    Bounds

    (Required) The annotation bounds, defining the location and the size of the annotation on the page in default user space units.

    (Inherited from PdfAnnotation)

    Locked

    (PDF 1.4) If set, do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user. However, this flag does not restrict changes to the annotation's contents, such as the value of a form field.

    (Inherited from PdfAnnotation)

    Metadata

    (Optional; PDF 1.4) A metadata stream containing metadata for the component.

    (Inherited from PdfObject)

    Page

    Gets the page with which this annotation is associated.

    (Inherited from PdfAnnotation)

    Inherited Methods

    SetBounds(System.Double, System.Double)

    Sets the size of the Bounds.

    (Inherited from PdfAnnotation)

    SetBounds(System.Double, System.Double, System.Double, System.Double)

    Sets the Bounds.

    (Inherited from PdfAnnotation)

    Extension Methods

    PdfObjectExtensions.GetDictionary(PdfObject)
    PdfObjectExtensions.GetOrAddDictionary(PdfObject)
    PdfObjectExtensions.GetArray(PdfObject)

    See Also

    PDF Specification ISO 32000-1:2008, section '12.5.6.5 Link Annotations'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.