PdfDocumentToBitmap Method (IEnumerableInt32, Int32)

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

Specific pages may be selected using the PageNumbers parameter.

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(
	IEnumerable<int> pageNumbers,
	int DPI = 72


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