Click or drag to resize

PdfDocumentRasterizeToImageFiles Method (String, IEnumerableInt32, ImageType)

Renders the PDF and exports image Files in convenient formats. Page Numbers 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: (
public string[] RasterizeToImageFiles(
	string FileNamePattern,
	IEnumerable<int> PageNumbers,
	ImageType ImageFileType = ImageType.Default


Type: SystemString
A full or partial file path for the output files containing an asterisk. E.g. C:\images\pdf_page_*.png
Type: System.Collections.GenericIEnumerableInt32
A list of the specific page numbers to render as images.
ImageFileType (Optional)
Type: IronPdfImageType
Type of the image file. If not specified, a best guess will be taken from the FileNamePattern file extension

Return Value

Type: String
An array of the file paths of the image files created.
See Also