PdfViewerControl.CreateBitmap(Int32, Int32) Method

Exports a PDF page to a bitmap image.

Namespace: DevExpress.Xpf.PdfViewer

Assembly: DevExpress.Xpf.PdfViewer.v20.1.dll

Declaration

public BitmapSource CreateBitmap(
    int index,
    int largestEdgeLength
)
Public Function CreateBitmap(
    index As Integer,
    largestEdgeLength As Integer
) As BitmapSource

Parameters

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.

Returns

Type Description
BitmapSource

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

Remarks

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