Skip to main content
All docs
V24.2

PdfViewer.GetSelectedThumbnailPageIndexes() Method

Obtains the indexes of the pages selected in the Page Thumbnails panel.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v24.2.dll

Declaration

public IReadOnlyCollection<int> GetSelectedThumbnailPageIndexes()

Returns

Type Description
IReadOnlyCollection<Int32>

A collection of page indexes.

Remarks

The following example shows how to save only the pages of a PDF document selected in the Page Thumbnails panel as images:

using System.Drawing;
using System.Drawing.Imaging;
// ...
void ExportSelectedPages(object sender, ItemClickEventArgs e){
    // Obtains the selected page indexes.
    var pages = pdfViewer1.GetSelectedThumbnailPageIndexes();
    // Saves each page from the collection to an image.
    foreach (var i in pages){
      Bitmap image = pdfViewer1.CreateBitmap(i, 1000);
      image.Save($"..\\MyBitmap{i+1}.bmp", ImageFormat.Bmp);
    }
}
See Also