Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RichEditDocumentServerExtensions.ExportToImage(Document, String) Method

Exports each document page to a separate image in PNG format.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.Docs.v24.2.dll

NuGet Package: DevExpress.Document.Processor

#Declaration

public static void ExportToImage(
    this Document document,
    string path
)

#Parameters

Name Type Description
document Document

The document currently loaded in the RichEditDocumentServer instance.

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