PdfLinkAnnotation
Represents a link annotation that can navigate to a destination or perform an action.
using Nutrient;Inherits from: PdfAnnotation
The SDK creates this class through factory methods or other SDK objects.
Properties
DestinationPageIndex
public int DestinationPageIndex { get; }The destination page index (0-based) if this link has an internal page destination. Returns -1 if no page destination is found.
Type: int
HighlightingMode
public string HighlightingMode { get; }The highlighting mode for the link.
Type: string
URI
public string URI { get; set; }The URI for this link annotation. Setting a non-empty value creates a URI action; setting empty removes any existing action.
Type: string
Methods
SetDestination
public void SetDestination(int pageNumber, float? x = null, float? y = null)Sets the link destination to navigate to a specific page in the document.
Parameters
| Name | Type | Description |
|---|---|---|
pageNumber | int | The 1-based destination page number. |
x | float? | Optional X coordinate on the destination page. If null, the view scrolls to the top-left. |
y | float? | Optional Y coordinate on the destination page. If null, the view scrolls to the top-left. |
Resource management
public void Dispose()PdfLinkAnnotation implements IDisposable. Call Dispose() or use a C# using declaration to release its native handle right away. If you don’t, the handle is released when the object is garbage collected.