Click or drag to resize

PdfDocumentToBitmap Method (NullableInt32, NullableInt32, IEnumerableInt32)

Rasterizes (renders) the PDF into System.Drawing.Bitmap objects.

Specific pages may be selected using the PageNumbers parameter. The Widths and Height of the output images may be specified.

Please add an assembly reference to System.Drawing to use this "PDF To Image" method

Please Dispose() each Bitmap object after use.

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: (
public Bitmap[] ToBitmap(
	Nullable<int> ImageMaxWidth,
	Nullable<int> ImageMaxHeight,
	IEnumerable<int> PageNumbers = null


Type: SystemNullableInt32
The target maximum width of the output images.
Type: SystemNullableInt32
The target maximum height of the output images.
PageNumbers (Optional)
Type: System.Collections.GenericIEnumerableInt32
Specific page numbers may be given to only convert part of the PDF document to images

Return Value

Type: Bitmap
An array of System.Drawing.Bitmap image objects which can be saved, manipulated, displayed or edited programmatically.
See Also