PdfDocumentToBitmap Method (NullableInt32, NullableInt32, IEnumerableInt32, Int32)

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: 2020.10.3
public Bitmap[] ToBitmap(
	Nullable<int> imageMaxWidth,
	Nullable<int> imageMaxHeight,
	IEnumerable<int> pageNumbers = null,
	int DPI = 72


Type: SystemNullableInt32
The target maximum width(in mm) of the output images.
Type: SystemNullableInt32
The target maximum height(in mm) 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
DPI (Optional)
Type: SystemInt32
The desired resolution of the output Images.

Return Value

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