Skip to main content

PdfViewerControl.CreateBitmap(Int32, Int32) Method

Exports a PDF page to a bitmap image.

Namespace: DevExpress.Xpf.PdfViewer

Assembly: DevExpress.Xpf.PdfViewer.v22.2.dll

NuGet Package: DevExpress.Wpf.PdfViewer


public BitmapSource CreateBitmap(
    int index,
    int largestEdgeLength


Name Type Description
index Int32

An integer value, specifying the page number.

largestEdgeLength Int32

An integer value, specifying the length of the image’s largest dimension.


Type Description

A System.Windows.Media.Imaging.BitmapSource object.


The CreateBitmap method has two parameters: the converted page’s number and the length of the image’s largest dimension in pixels. The latter parameter determines the output image height for pages in the portrait orientation and width - for landscape pages.

You can reduce the output image size and memory consumption if you pass a smaller largestEdgeLength value to the CreateBitmap method. The document page will not be clipped when it is converted to bitmap. The page will be proportionally scaled so that the largest edge of the converted bitmap is equal to the largestEdgeLength value.

See Also