- Code: Select all
PdfLaunchAction launchAction = new PdfLaunchAction(linkPath, PdfFilePathType.Relative);
RectangleF rect = new RectangleF(find.Position.X, find.Position.Y, find.Size.Width, find.Size.Height);
PdfActionAnnotation annotation = new PdfActionAnnotation(rect, launchAction);
(page as PdfPageWidget).AnnotationsWidget.Add(annotation);
This works fine if the user has changed the default action for "Open cross-document links in same window", but if they stick with the default we have problems, as there is no Back button. Is there a way to modify the AnnotationWidget or PdfLaunchAction so that the cross-document link opens the linked PDF in a new window? Or some other solution that I'm not finding?