PdfSaveOptionsOpenHyperlinksInNewWindow Property |
Namespace: Aspose.Words.Saving
The default value is false. When this value is set to true hyperlinks are saved using JavaScript code. JavaScript code is app.launchURL("URL", true);, where URL is a hyperlink.
Note that if this option is set to true hyperlinks can't work in some PDF readers e.g. Chrome, Firefox.
DocumentBuilder builder = new DocumentBuilder(); builder.InsertHyperlink("Testlink", uri, false); // Set this property to false if you are sure that hyperlinks in document's model are already escaped PdfSaveOptions options = new PdfSaveOptions(); options.EscapeUri = isEscaped; options.OpenHyperlinksInNewWindow = true; builder.Document.Save(ArtifactsDir + "PdfSaveOptions.EscapedUri.pdf", options);