PdfDocumentRasterizeToImageFiles Method (String, NullableInt32, NullableInt32, ImageType, Int32)

Renders the PDF and exports image Files in convenient formats. Image dimensions may be specified. 1 image file is created for each page.

FileNamePattern should normally contain an asterisk (*) character which will be substituted for the page numbers

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 2020.10.3
Syntax
public string[] RasterizeToImageFiles(
	string FileNamePattern,
	Nullable<int> ImageMaxWidth,
	Nullable<int> ImageMaxHeight,
	ImageType ImageFileType = ImageType.Default,
	int DPI = 72
)

Parameters

FileNamePattern
Type: SystemString
A full or partial file path for the output files containing an asterisk. E.g. C:\images\pdf_page_*.png
ImageMaxWidth
Type: SystemNullableInt32
The target maximum width of the output images.
ImageMaxHeight
Type: SystemNullableInt32
The target maximum height of the output images.
ImageFileType (Optional)
Type: IronPdfImageType
Type of the image file. If not specified, a best guess will be taken from the FileNamePattern file extension
DPI (Optional)
Type: SystemInt32
The desired resolution of the output Images.

Return Value

Type: String
An array of the file paths of the image files created.
See Also
Download DLL or Install with Nuget