RichEditDocumentServerExtensions.ExportToImage(Document, String) Method
SECURITY-RELATED CONSIDERATIONS
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.
Exports each document page to a separate image in PNG format.
Namespace: DevExpress.XtraRichEdit
Assembly: DevExpress.Docs.v25.2.dll
NuGet Package: DevExpress.Document.Processor
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| document | Document | The document currently loaded in the |
| path | String | The file name (including the full path and extension) for the created images. |
Remarks
The following code snippet exports all document pages to images:
using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit.Export.Image;
using DevExpress.Drawing;
using (var wordProcessor = new RichEditDocumentServer()) {
wordProcessor.LoadDocument(@"C:\Documents\Alice.docx");
wordProcessor.Document.ExportToImage(@"C:\Documents\Image.jpeg");
}
See Also