PDFRendererSettings¶
Namespace: O2S.Components.PDF4NET.Rendering
Settings class for PDF rendering process.
Inheritance Object → PDFRendererSettings
Constructors¶
PDFRendererSettings()¶
Initializes a new PDFRendererSettings object.
PDFRendererSettings(Double, Double)¶
Initializes a new PDFRendererSettings object.
Parameters
dpiX Double
Horizontal resolution used for converting the PDF page to image.
dpiY Double
Vertical resolution used for converting the PDF page to image.
PDFRendererSettings(Double, Double, PDFRenderingSurface)¶
Initializes a new PDFRendererSettings object.
Parameters
dpiX Double
Horizontal resolution used for converting the PDF page to image.
dpiY Double
Vertical resolution used for converting the PDF page to image.
renderingSurface PDFRenderingSurface
Surface used for rendering the page content.
Properties¶
BackgroundColor¶
Gets or sets the background color of the rendered page.
Property Value
Int32
The background color of the rendered page.
Remarks
The byte layout of the color components in this color must match the byte layout in the rendering surface. For example if the rendering surface is RGBA then this color must also be specified as RGBA.
DpiX¶
Gets or sets the horizontal resolution.
Property Value
Double
Horizontal resolution for rendering a PDF page to image.
DpiY¶
Gets or sets the vertical resolution.
Property Value
Double
Vertical resolution for rendering a PDF page to image.
EnableRenderingCache¶
Gets or sets a value indicating whether the rendering cache should be enabled.
Property Value
Boolean
True if graphic objects should be cached.
Remarks
Increased memory consumption can appear when caching is enabled.
ErrorHandling¶
Gets of sets a value specifying how the rendering errors are handled.
Property Value
PDFRenderingErrorHandling
A PDFRenderingErrorHandling value.
FontSubstitution¶
Gets or sets the font substitution rules.
Property Value
PDFFontSubstitution
A PDFFontSubstitution object specifying how fonts are substituted when rendering the PDF file.
ImageOptions¶
Gets the options for rendering images.
Property Value
PDFRendererImageOptions
A PDFRendererImageOptions object specifying how the images embedded in PDF pages should be rendered in the output image.
InfoDpiX¶
Gets or sets the horizontal resolution of the output TIFF image.
Property Value
Double
Horizontal resolution that will be written in the output TIFF image.
Remarks
This property is used only when converting PDF pages to TIFF images.
The resolution used for conversion is the one specified in PDFRendererSettings.DpiX and PDFRendererSettings.DpiY values.
This PDFRendererSettings.InfoDpiX value will be written in the TIFF file if you need that value to be different from the one used for conversion.
InfoDpiY¶
Gets or sets the vertical resolution of the output TIFF image.
Property Value
Double
Vertical resolution that will be written in the output TIFF image.
Remarks
This property is used only when converting PDF pages to TIFF images.
The resolution used for conversion is the one specified in PDFRendererSettings.DpiX and PDFRendererSettings.DpiY values.
This PDFRendererSettings.InfoDpiY value will be written in the TIFF file if you need that value to be different from the one used for conversion.
LayerRenderTarget¶
Gets or sets the rendering target for content included in PDF layers (optional content).
Property Value
PDFLayerRenderTarget
A PDFLayerRenderTarget enum member specifying how the layer content is handled during PDF to image conversion.
OutputImageSize¶
Gets or sets the size of the output image.
Property Value
PDFSize
A object specifying the size of the output image.
Remarks
By default the size of the output image is determined by the PDFRendererSettings.DpiX and PDFRendererSettings.DpiY properties. When this property is set, the PDFRendererSettings.DpiX and PDFRendererSettings.DpiY properties are ignored.
RenderAnnotations¶
Gets or sets the value indicating whether the page annotations should be rendered.
Property Value
Boolean
True if the page annotations should be rendered, false otherwise.
Remarks
When converting a PDF page to image, the page annotations on the page can be removed from rendering if this property is set to true. Widget annotations (form fields) are not affected by this property, they are removed from rendering when PDFRendererSettings.RenderFormFields property is set to false.
RenderArea¶
Gets or sets the rendering area.
Property Value
PDFDisplayRectangle
A object specifying the area on the page to be rendered as image.
Remarks
If this property is null then the page's CropBox is used as render area.
The rectangle specified in this property can have arbitrary values allowing to render any parts of the page, including parts outside the visible area.
RenderFormFields¶
Gets or sets the value indicating whether the form fields should be rendered.
Property Value
Boolean
True if the form fields should be rendered, false otherwise.
Remarks
When converting a PDF page to image, the form fields on the page can be removed from rendering if this property is set to true.
RenderGraphics¶
Gets or sets the value indicating whether the vector graphics should be rendered.
Property Value
Boolean
True if the vector graphics should be rendered, false otherwise.
Remarks
When converting a PDF page to image, the vector graphics on the page can be removed from rendering if this property is set to true.
RenderImages¶
Gets or sets the value indicating whether the images should be rendered.
Property Value
Boolean
True if the images should be rendered, false otherwise.
Remarks
When converting a PDF page to image, the images on the page can be removed from rendering if this property is set to true. This property removes from rendering both regular images and image masks.
RenderingSurface¶
Gets or sets the rendering surface.
Property Value
PDFRenderingSurface
The surface on which the PDF page is rendered.
Remarks
If no rendering surface is provided a default RGBA surface is created.
RenderText¶
Gets or sets the value indicating whether the text should be rendered.
Property Value
Boolean
True if the text should be rendered, false otherwise.
Remarks
When converting a PDF page to image, the text on the page can be removed from rendering if this property is set to true.
RenderThreadCount¶
Gets or sets the number of threads used for rendering. The number of threads to be used for rendering the page.This property lets you speed up the page rendering processed by using multiple threads. Accepted values are 1 (single threaded, default rendering mode), 2 and 4.
Property Value
SnapRectanglesToGrid¶
Gets or sets a value indicating whether the rendered rectangles should be aligned to pixel grid.
Property Value
Boolean
True if the rectangles should be aligned to pixel grid.