Class PdfImageExtractionProcessingOptions
Specifies the options for extracting an image from a PDF document with a PdfImageExtractionProcessor.
The image is rendered from the page specified by PageNumber (the first page by default). If Dpi is specified, the page is rendered at that resolution, capped so that the longest edge of the resulting image does not exceed MaxPixelSize (if specified). Otherwise, the longest edge of the resulting image is sized to MaxPixelSize pixels. PDF pages are vector-based, so these options determine the rasterization size rather than resizing an existing raster image.
The extracted image format is PNG.
Note: If no image is able to be extracted, then a FileProcessingException will be thrown when processing.
Implements
Namespace: FulcrumFS.Pdf
Assembly: FulcrumFS.Pdf.dll
Syntax
public sealed record PdfImageExtractionProcessingOptions : IEquatable<PdfImageExtractionProcessingOptions>
Properties
| Name | Description |
|---|---|
| BackgroundColor | Gets or initializes the background color rendered behind transparent regions of the page. Default is White. |
| Dpi | Gets or initializes the resolution in dots per inch (DPI) to render the page at, based on the page's physical size.
Default is null, meaning the render size is determined solely by MaxPixelSize. Must be between Note: at least one of Dpi or MaxPixelSize must be specified. |
| MaxPixelSize | Gets or initializes the maximum size in pixels of the longest edge of the extracted image. The other edge is sized to preserve the page's aspect ratio.
Default is Note: at least one of Dpi or MaxPixelSize must be specified. |
| PageNumber | Gets or initializes the 1-based page number of the PDF document to extract the image from.
Default is |
| Password | Gets or initializes the password used to open the PDF document. Default is null, meaning no password is used. If the document is password-protected and the correct password is not provided, a FileProcessingException is thrown when processing. |
| RenderAnnotations | Gets or initializes a value indicating whether annotations are rendered in the extracted image. Default is true. |
| RenderFormFields | Gets or initializes a value indicating whether filled form fields are rendered in the extracted image. Default is true. |
| Standard | Gets an options instance with standard PDF image extraction settings - extracts the first page with default settings. |