Apitron.PDF.Rasterizer library for .NET
Assembly: Apitron.PDF.Rasterizer (in Apitron.PDF.Rasterizer.dll) Version: 3.0.154.0 (3.0.154.0)
A bitmap representing content of the page, any errors encountered will be logged to errorLogger if present. If rendering fails null will be returned.
Renders the page to an image represented by array of integers with pixel format ARGB8888(hence one array element represents one pixel), the stride width would be desiredWidth in this case.
Namespace: Apitron.PDF.Rasterizer
Assembly: Apitron.PDF.Rasterizer (in Apitron.PDF.Rasterizer.dll) Version: 3.0.154.0 (3.0.154.0)
Syntax
public int[] RenderAsInts( Resolution resolution, Rectangle cropBox, RenderingSettings settings, ErrorLogger errorLogger = null )
Parameters
- resolution
- Type: Apitron.PDF.Rasterizer.ConfigurationResolution
The resolution of the resulting image. By default the resolution of the PDF page is set to 72 dpi so if you render the page using its original size you get this resolution. This setting allows you to set desired resolution, it's an equivalent to setting a bigger resulting image size. - cropBox
- Type: Apitron.PDF.RasterizerRectangle
The crop box defines the region to which the contents of the page shall be clipped (cropped) when rendered. - settings
- Type: Apitron.PDF.Rasterizer.ConfigurationRenderingSettings
The rendering settings, can't be null. - errorLogger (Optional)
- Type: Apitron.PDF.Rasterizer.ErrorHandlingErrorLogger
An optional error logger object.
Return Value
Type: Int32A bitmap representing content of the page, any errors encountered will be logged to errorLogger if present. If rendering fails null will be returned.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | If settings are null. |
ArgumentNullException | If resolution is null. |
See Also