Pdf | |
The PdfRasterizer type exposes the following members.
| Name | Description | |
|---|---|---|
| PdfRasterizer | Initializes a new instance of the PdfRasterizer class. |
| Name | Description | |
|---|---|---|
| ColorSpace | The color space of the generated images. Default RGB. | |
| DocumentInformation |
PDF document information. Populated after the first operation that returns metadata (e.g.
GetPageCount, GetInfo).
(Inherited from PdfTool) | |
| EndPageNumber |
The 1-based page number where the current operation ends. The default value is 0, which means
the operation runs to the last page.
(Inherited from PdfTool) | |
| ImagesFormat | The image format for the files written by Save. Default PNG. | |
| ImagesPath | The folder where Save / SaveTiff write the images. | |
| ImagesPrefix | The file-name prefix for the images written by Save / SaveTiff. | |
| Resolution | The resolution of the generated images in DPI. Default 120. | |
| StartPageNumber |
The 1-based page number where the current operation starts. The default value is 1 (first page).
(Inherited from PdfTool) | |
| Timeout | Timeout in seconds for the current operation. Default 600 seconds. (Inherited from PdfTool) | |
| UserPassword | The user password used to open the PDF document for reading. Default null (no password). (Inherited from PdfTool) |
| Name | Description | |
|---|---|---|
| ConvertToImages | Converts the selected PDF pages to images, each returned as encoded image bytes. | |
| ConvertToTiff | Converts the selected PDF pages to a single multi-frame TIFF. | |
| GetInfo | Gets the document information (title, author, page count, etc.). (Inherited from PdfTool) | |
| GetPageCount | Gets the number of pages in the loaded PDF document. (Inherited from PdfTool) | |
| Load(Byte) | Loads a PDF document from a byte array. (Inherited from PdfTool) | |
| Load(PdfDocument) | Loads an in-memory PdfDocument for reading. (Inherited from PdfTool) | |
| Load(Stream) | Loads a PDF document from a stream. (Inherited from PdfTool) | |
| Load(String) | Loads a PDF document from a file. (Inherited from PdfTool) | |
| Load(Byte, String) | Loads a password-protected PDF document from a byte array. (Inherited from PdfTool) | |
| Load(PdfDocument, String) | Loads an in-memory PdfDocument. The password is used to open the document. (Inherited from PdfTool) | |
| Load(Stream, String) | Loads a password-protected PDF document from a stream. (Inherited from PdfTool) | |
| Load(String, String) | Loads a password-protected PDF document from a file. (Inherited from PdfTool) | |
| Save | Converts the selected PDF pages to image files written into ImagesPath, named ImagesPrefix + page number, in ImagesFormat. | |
| SaveTiff | Converts the selected PDF pages to a single multi-frame TIFF written into ImagesPath as ImagesPrefix + ".tiff". |
PdfRasterizer rasterizer = new PdfRasterizer(); rasterizer.Load("document.pdf"); rasterizer.Resolution = 150; // one PNG per page byte[][] pngPages = rasterizer.ConvertToImages(); rasterizer.ImagesPath = "output"; rasterizer.ImagesPrefix = "page-"; // writes output/page-1.png, ... rasterizer.Save();