Back to Devexpress

ImageExportOptions.ExportMode Property

corelibraries-devexpress-dot-xtraprinting-dot-imageexportoptions-a15aa2dd.md

latest6.3 KB
Original Source

ImageExportOptions.ExportMode Property

Specifies whether document pages are exported to a single or multiple images.

Namespace : DevExpress.XtraPrinting

Assembly : DevExpress.Printing.v25.2.Core.dll

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
[DefaultValue(ImageExportMode.SingleFile)]
public ImageExportMode ExportMode { get; set; }
vb
<DefaultValue(ImageExportMode.SingleFile)>
Public Property ExportMode As ImageExportMode

Property Value

TypeDefaultDescription
ImageExportModeSingleFile

An ImageExportMode enumeration value.

|

Available values:

NameDescription
SingleFile

Exports the document to a single image without indicating the borders of individual pages.

The document’s page headers and footers, and the top and bottom margins are repeated only once - at the beginning and end of the resulting image.

When this export mode is used, the ImageExportOptions.PageRange property is ignored.

| | SingleFilePageByPage |

The document is exported to a single image with borders drawn around each page.

The document’s page headers and footers, and top and bottom margins appear on every page.

The border settings are specified by the ImageExportOptions.PageBorderWidth and ImageExportOptions.PageBorderColor properties.

| | DifferentFiles |

Exports each document page to a separate image (with the image file name indicating the page number).

The document’s page headers and footers, and the top and bottom margins are repeated only once - at the beginning and end of the resulting image.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ExportMode
ExportOptions

.Image .ExportMode

|

Remarks

The following image export modes are available:

|

Export Mode

|

Description

| | --- | --- | |

ImageExportMode.SingleFile

|

Exports the document to a single image without indicating the borders of individual pages.

The document’s page headers and footers, and the top and bottom margins are repeated only once - at the beginning and end of the resulting image.

When this export mode is used, the ImageExportOptions.PageRange property is ignored.

| |

ImageExportMode.SingleFilePageByPage

|

The document is exported to a single image with borders drawn around each page.

The document’s page headers and footers, and top and bottom margins appear on every page.

The border settings are specified by the ImageExportOptions.PageBorderWidth and ImageExportOptions.PageBorderColor properties.

| |

ImageExportMode.DifferentFiles

|

Exports each document page to a separate image (with the image file name indicating the page number).

The document’s page headers and footers, and the top and bottom margins are repeated only once - at the beginning and end of the resulting image.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the ExportMode 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.

dxrichedit-for-wpf-how-to-print-a-document-as-a-series-of-images/CS/SaveAsImage/MainWindow.xaml.cs#L32

csharp
ImageExportOptions imgOptions = new ImageExportOptions();
imgOptions.ExportMode = ImageExportMode.DifferentFiles;
imgOptions.Format = System.Drawing.Imaging.ImageFormat.Png;

office-file-api-create-thumbnail-images-for-docx-xlsx-pdf-files/VB/ImageExporterHelper.vb#L44

vb
Dim options As ImageExportOptions = New ImageExportOptions()
options.ExportMode = ImageExportMode.SingleFilePageByPage
options.PageRange = "1"

dxrichedit-for-wpf-how-to-print-a-document-as-a-series-of-images/VB/SaveAsImage/MainWindow.xaml.vb#L27

vb
Dim imgOptions As ImageExportOptions = New ImageExportOptions()
imgOptions.ExportMode = ImageExportMode.DifferentFiles
imgOptions.Format = System.Drawing.Imaging.ImageFormat.Png

See Also

Document Export Overview

ImageExportOptions Class

ImageExportOptions Members

DevExpress.XtraPrinting Namespace