officefileapi-devexpress-dot-xtrarichedit-dot-export-dot-documentexporteroptions.md
Using file paths sourced from untrusted input may expose unauthorized files or allow unintended file access. Always validate and normalize all external paths to prevent path manipulation.
Gets or sets the URI of the document being exported.
Namespace : DevExpress.XtraRichEdit.Export
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
[Browsable(false)]
public string TargetUri { get; set; }
<Browsable(False)>
Public Property TargetUri As String
| Type | Description |
|---|---|
| String |
A string representing the document URI.
|
You may wish to specify the TargetUri value when exporting the document to formats that require saving certain content as separate objects, such as the HTML format with images and css files. Handle the RichEditControl.BeforeExport or RichEditDocumentServer.BeforeExport event to get access to exporter options and specify the TargetUri as the location for external files.
The following code snippets (auto-collected from DevExpress Examples) contain references to the TargetUri property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-richedit-save-text-from-a-range-in-different-formats/CS/GetTextMethodsExample/Form1.cs#L252
options.HtmlNumberingListExportFormat = DevExpress.XtraRichEdit.Export.Html.HtmlNumberingListExportFormat.HtmlFormat;
options.TargetUri = Path.GetFileNameWithoutExtension(this.fileName);
}
word-document-api-examples/CS/CodeExamples/ExportActions.cs#L150
options.HtmlNumberingListExportFormat = HtmlNumberingListExportFormat.HtmlFormat;
options.TargetUri = "Document_HTML.html";
}
word-processing-customize-html-export/CS/Program.cs#L68
options.CssPropertiesExportType = cssExportType;
options.TargetUri = Path.GetFileNameWithoutExtension(fileName);
Document document = wordProcessor.Document;
winforms-richedit-save-text-from-a-range-in-different-formats/VB/GetTextMethodsExample/Form1.vb#L192
options.HtmlNumberingListExportFormat = DevExpress.XtraRichEdit.Export.Html.HtmlNumberingListExportFormat.HtmlFormat
options.TargetUri = Path.GetFileNameWithoutExtension(Me.fileName)
End If
word-document-api-examples/VB/CodeExamples/ExportActions.vb#L134
options.HtmlNumberingListExportFormat = Html.HtmlNumberingListExportFormat.HtmlFormat
options.TargetUri = "Document_HTML.html"
End If
word-processing-customize-html-export/VB/Program.vb#L66
options.CssPropertiesExportType = cssExportType
options.TargetUri = Path.GetFileNameWithoutExtension(fileName)
Dim document As Document = wordProcessor.Document
See Also