Skip to main content
A newer version of this page is available. .

PdfViewer.CreateBitmap(Int32, Int32) Method

Exports a PDF page to a bitmap image.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v18.2.dll

Declaration

public Bitmap CreateBitmap(
    int pageNumber,
    int largestEdgeLength
)

Parameters

Name Type Description
pageNumber 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
Bitmap

A Bitmap 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