PdfSaveOptionsEscapeUri Property

A flag specifying whether URI should be escaped before writing.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public bool EscapeUri { get; set; }

Property Value

Type: Boolean
Remarks
Note that if this option is set to false hyperlinks are written "as is", so valid (escaped) URI should be provided in document's model.

The default value is true.

Examples
Shows how to escape hyperlinks or not in the document.
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);
See Also