PdfDocumentPageToBitmap Method (Int32, Int32)

Renders a single page of the PDF to a System.Drawing.Bitmap object.

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.7.1
Syntax
public Bitmap PageToBitmap(
	int PageNumber,
	int DPI = 72
)

Parameters

PageNumber
Type: SystemInt32
The page number to be converted to an image.
DPI (Optional)
Type: SystemInt32
The desired resolution of the output Images.

Return Value

Type: Bitmap
A System.Drawing.Bitmap of the rendered PDF page.
See Also
Download DLL or Install with Nuget