PdfLinkAnnotation Class

A clickable hyperlink annotation placed on a PDF page. Use one of the static factory methods (FromUrl(String, Int32, Single, Single, Single, Single), ToPage(Int32, Int32, Single, Single, Single, Single), ToPageLocation(Int32, PdfLinkPageLocation, Int32, Single, Single, Single, Single) to build the link, then pass it to AddLinkAnnotation on the document, editor, merger or HTML-to-PDF document options.

For PDF/UA compliance, set Description to a meaningful alternative description

Definition

Namespace: HiQPdf.Next
Assembly: HiQPdf.Next (in HiQPdf.Next.dll) Version: 18.9.2
C#
public class PdfLinkAnnotation
Inheritance
Object    PdfLinkAnnotation

Properties

BorderStyle Border style drawn around the clickable hotspot. Default: None (no visible border, typical for text hyperlinks where the link target is implied by the underlying text)
BorderWidth Border width in points when BorderStyle is not None. Default: 1.0
Description Alternative text description used by assistive technologies and written to the annotation's /Contents entry. Required by PDF/UA-1 and PDF/UA-2; recommended for all documents. When omitted, the URL (for URI links) or a generic phrase is used as a fallback so /Contents is never empty
Height Height of the clickable hotspot in points
HighlightMode Visual feedback shown when the user activates the link (mouse-down / tap). Default: Invert
PageNumber Page number on which the clickable hotspot is placed (1-based)
Width Width of the clickable hotspot in points
X X coordinate of the hotspot's top-left corner, in points (1/72 in), measured from the left edge of the page content area
Y Y coordinate of the hotspot's top-left corner, in points, measured from the top edge of the page content area

Methods

Equals
(Inherited from Object)
Finalize
(Inherited from Object)
FromUrl Creates a hyperlink that opens an external URL when activated. Produces a URI action (always allowed in PDF/A)
GetHashCode
(Inherited from Object)
GetType
(Inherited from Object)
MemberwiseClone
(Inherited from Object)
ToPage Creates a hyperlink that jumps to another page within the same document, fitting the whole page in the viewport. Produces a GoTo action with a /Fit destination (allowed in every PDF/A)
ToPageLocation Creates a hyperlink that jumps to a specific location on another page within the same document. Produces a GoTo action with an explicit destination (Xyz / FitH / FitV / FitR) controlled by the supplied PdfLinkPageLocation
ToString
(Inherited from Object)

See Also