LinkAnnotation Class
Contains settings for a link annotation.
Namespace: DevExpress.Docs.Pdf
Assembly: DevExpress.Docs.Pdf.v26.1.dll
Declaration
Example
How to: Create a Link Annotation in a PDF Document

FileStream fs = File.OpenRead("Demo.pdf");
var options = new LoadOptions();
PdfDocument document = new PdfDocument(fs, options);
Page page = document.Pages[0];
var searchResults = document.FindText("PDF Viewer", 0, 0).ToArray();
RectangleF textRect = searchResults[0].Groups[0].Matches[0].MatchFragment.Rectangle.BoundingBox;
LinkAnnotation linkAnnotation = new(textRect) {
Action = new UriAction { Uri = "https://www.devexpress.com" },
HighlightingMode = AnnotationHighlightingMode.Invert
};
page.Annotations.Add(linkAnnotation);
document.Save(new FileStream("Demo2.pdf", FileMode.Create, FileAccess.Write));
Implements
Inheritance
Object
BaseAnnotation
LinkAnnotation
See Also