RemoteGoToAction Class
An action that jumps to a destination in another PDF file instead of the current file.
Namespace: DevExpress.Docs.Pdf
Assembly: DevExpress.Docs.Pdf.v26.1.dll
NuGet Package: DevExpress.Docs.Pdf
Declaration
Example
How to: Create a Link to Another PDF Document
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);
document.Pages[0].Fragments.Add(new TextFragment {
Text = "Open Invoice",
Location = new PointF(510, 50),
Font = new TextFont("Arial", TextFontStyle.Regular),
ForegroundFill = new SolidFill(PdfColor.Blue)
});
LinkAnnotation linkAnnotation = new(textRect) {
Action = new RemoteGoToAction { Destination = new FitDestination { PageIndex = 1 }, FileSpecification = new FileSpecification { FileName = "Invoice.pdf" }, OpenInNewWindow = true },
HighlightingMode = AnnotationHighlightingMode.Push
};
page.Annotations.Add(linkAnnotation);
document.Save(new FileStream("Demo2.pdf", FileMode.Create, FileAccess.Write));
Inheritance
Object
InteractiveAction
RemoteGoToAction
See Also