GoToAction Class
An action that jumps to a destination in the current PDF document.
Namespace: DevExpress.Docs.Pdf
Assembly: DevExpress.Docs.Pdf.v26.1.dll
NuGet Package: DevExpress.Docs.Pdf
Declaration
Example
How to: Create a Link to a Specific Page

FileStream fs = File.OpenRead("Demo.pdf");
var options = new LoadOptions();
PdfDocument document = new PdfDocument(fs, options);
Page page = document.Pages[0];
RectangleF textRect = new RectangleF(500, 30, 100, 50);
page.Fragments.Add(new TextFragment {
Text = "Open 3rd Page",
Location = new PointF(510, 50),
Font = new TextFont("Arial", TextFontStyle.Regular),
ForegroundFill = new SolidFill(PdfColor.Blue)
});
LinkAnnotation linkAnnotation = new(textRect) {
Action = new GoToAction {
Destination = new FitDestination(),
Page = document.Pages[2] },
HighlightingMode = AnnotationHighlightingMode.Push
};
page.Annotations.Add(linkAnnotation);
document.Save(new FileStream("Demo2.pdf", FileMode.Create, FileAccess.Write));
Inheritance
Object
InteractiveAction
GoToAction
See Also