Class ImageType
Image file formats for converting PDF pages to images. Choose format based on quality needs, file size, and compatibility requirements.
// Convert PDF to high-quality PNG images:
pdf.RasterizeToImageFiles("page_*.png", ImageType.Png);
// Convert to JPEG for smaller file sizes:
pdf.RasterizeToImageFiles("image_*.jpg", ImageType.Jpeg, 90);
// Create multi-page TIFF for archiving:
pdf.RasterizeToImageFiles("document.tiff", ImageType.MultiPageTiff);
// Let file extension determine format:
pdf.RasterizeToImageFiles("output.png", ImageType.Default);See: https://ironpdf.com/how-to/pdf-to-image/
Inheritance
Namespace: IronPdf.Imaging
Assembly: IronPdf.dll
Syntax
public sealed class ImageType : Enum
Fields
Bitmap
Windows Bitmap format (.bmp). Large files but pixel-perfect quality. Best for Windows-only applications requiring lossless images.
// High quality, large file size:
pdf.RasterizeToImageFiles("page_*.bmp", ImageType.Bitmap);
Declaration
public const ImageType Bitmap
Field Value
| Type | Description |
|---|---|
| ImageType |
Default
Auto-detects format from file extension (.png, .jpg, etc). Falls back to PNG if extension not recognized.
// Extension determines format:
pdf.RasterizeToImageFiles("page.jpg", ImageType.Default); // JPEG
pdf.RasterizeToImageFiles("page.png", ImageType.Default); // PNG
pdf.RasterizeToImageFiles("page", ImageType.Default); // PNG (default)
Declaration
public const ImageType Default
Field Value
| Type | Description |
|---|---|
| ImageType |
Gif
GIF format with 256 color limit. Small files for simple graphics. Best for basic images with few colors. Not recommended for photos.
// Simple graphics only:
pdf.RasterizeToImageFiles("simple_*.gif", ImageType.Gif);
Declaration
public const ImageType Gif
Field Value
| Type | Description |
|---|---|
| ImageType |
Jpeg
JPEG format for photos and complex images. Smaller files with adjustable quality. Best for web display, emails, or when file size matters.
// Compress for web use (quality 0-100):
pdf.RasterizeToImageFiles("web_*.jpg", ImageType.Jpeg, 85);
Declaration
public const ImageType Jpeg
Field Value
| Type | Description |
|---|---|
| ImageType |
MultiPageTiff
Multi-page TIFF combining all PDF pages into one file. Perfect for document management systems and fax transmission.
// All pages in single TIFF:
pdf.RasterizeToImageFiles("complete.tiff", ImageType.MultiPageTiff);
// Result: One TIFF file containing all pages
Declaration
public const ImageType MultiPageTiff
Field Value
| Type | Description |
|---|---|
| ImageType |
Png
PNG format with lossless compression and transparency support. Best for screenshots, diagrams, text, or when quality is critical.
// High quality with transparency:
pdf.RasterizeToImageFiles("page_*.png", ImageType.Png);
Declaration
public const ImageType Png
Field Value
| Type | Description |
|---|---|
| ImageType |
Tiff
TIFF format for professional printing and archiving. Each PDF page becomes a separate TIFF file.
// Individual TIFF files per page:
pdf.RasterizeToImageFiles("page_*.tiff", ImageType.Tiff);
Declaration
public const ImageType Tiff
Field Value
| Type | Description |
|---|---|
| ImageType |
value__
Declaration
public int value__
Field Value
| Type | Description |
|---|---|
| System.Int32 |