Back to Devexpress

ImageExportOptions.PageRange Property

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

latest3.8 KB
Original Source

ImageExportOptions.PageRange Property

Specifies the range of pages to be exported.

Namespace : DevExpress.XtraPrinting

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

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
public override string PageRange { get; set; }
vb
Public Overrides Property PageRange As String

Property Value

TypeDescription
String

A String value, specifying the range of pages. The ranges are defined using hyphens and separated by commas. For example: “1,3,5-12”.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to PageRange
ExportOptions

.Image .PageRange

|

Remarks

Only valid page numbers are taken into account. When some of the pages specified in a page range are missing in the current document, invalid page numbers are ignored. When there are no valid page numbers in the specified page range, all pages of the document are exported.

The PageRange property is ignored when the ImageExportOptions.ExportMode property is set to ImageExportMode.SingleFile.

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

csharp
imgOptions.Resolution = 150;
imgOptions.PageRange = "1,3-5";
pcl.ExportToImage("export.png", imgOptions);

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

vb
options.ExportMode = ImageExportMode.SingleFilePageByPage
options.PageRange = "1"
pLink.ExportToImage(mStream, options)

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

vb
imgOptions.Resolution = 150
imgOptions.PageRange = "1,3-5"
pcl.ExportToImage("export.png", imgOptions)

See Also

ImageExportOptions Class

ImageExportOptions Members

DevExpress.XtraPrinting Namespace