Class ImageSaveOptions
Options for saving a single PDF page as a raster image.
Used with the extension methods provided by DRIT.Pdf.Rendering.
Inherited Members
Namespace: DRIT.Pdf.IO
Assembly: DRIT.Pdf.dll
Syntax
public sealed class ImageSaveOptions
Constructors
ImageSaveOptions(ImageSaveFormat)
Creates options for the specified image format.
Declaration
public ImageSaveOptions(ImageSaveFormat format)
Parameters
| Type | Name | Description |
|---|---|---|
| ImageSaveFormat | format |
Properties
Dpi
Dots-per-inch used to compute pixel dimensions when Width is 0.
Defaults to 96.
Declaration
public int Dpi { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Format
The output image format (JPEG, PNG, or TIFF).
Declaration
public ImageSaveFormat Format { get; }
Property Value
| Type | Description |
|---|---|
| ImageSaveFormat |
JpegQuality
JPEG quality in the range 1–100. Ignored for PNG. Defaults to 85.
Declaration
public int JpegQuality { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
PageCount
Number of pages to render starting from PageNumber. A value less than or equal to 0 means all remaining pages. Defaults to 1.
Declaration
public int PageCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
PageNumber
Zero-based index of the page to render. Defaults to 0.
Declaration
public int PageNumber { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Width
Desired output width in pixels.
The height is calculated automatically from the page aspect ratio.
Set to 0 to derive the size from Dpi instead.
Declaration
public int Width { get; set; }
Property Value
| Type | Description |
|---|---|
| int |