PdfRenderOptions Class
The options of PdfRenderer.
public sealed class PdfRenderOptionsConstructors
| Name | Description |
|---|---|
| PdfRenderOptions() |
PdfRenderOptions()
PdfRenderOptions.cspublic PdfRenderOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| Background | Gets or initializes the color the page is painted on before its content; null for a transparent background. |
| Configuration | Gets or initializes the configuration of the image the page is rendered to: its limits and allocation scope. |
| Default | Gets the default options: 72 dots per inch, a white background, the annotations, the system fonts. |
| Dpi | Gets or initializes the resolution, in dots per inch: 72 renders one pixel per point. |
| FontResolver | Gets or initializes the font that replaces a font the document does not embed. When it is null or returns null, a standard font is replaced by a bundled font of the same widths, another font by a font of the system, else by a bundled font of its kind. |
| Height | Gets or initializes the height of the image, in pixels: the resolution is the one that gives the region (the crop box by default, turned by the rotation of the page) this height, instead of PdfRenderOptions.Dpi. With PdfRenderOptions.Width, the region is fitted inside both, keeping its proportions. |
| Intent | Gets or initializes the purpose of the rendering: it selects the annotations drawn (the Print, NoView and Hidden flags) and the optional content that the usage of its groups turns on or off. |
| MaxOperations | Gets or initializes the work a page may do: the operators of its content and of the forms, patterns and glyphs it paints, a content stream being able to paint the others many times. |
| OptionalContentConfiguration | Gets or initializes the name (/Name) of the optional content configuration of the document that sets which layers are visible (ISO 32000-2, 8.11.4.3); null, or a name the document does not have, for the default configuration. |
| OptionalContentGroupStates | Gets or initializes the visibility of optional content groups (layers) that replaces the one of the configuration: the keys are the names of the groups (/Name), and every group of a name is turned on or off. |
| PathAntialiasing | Gets or initializes whether the edges of the paths, the images and the shadings are antialiased; false draws them with hard edges. |
| Plate | Gets or initializes the colorant whose plate is rendered, or null (the default) for the colors of the page: Cyan, Magenta, Yellow, Black, or the name of a spot colorant of a separation or DeviceN color space. The plate is rendered in gray, as a film: black for full ink, white for none. |
| Region | Gets or initializes the region of the page rendered, in the default user space of the page (the coordinates of its boxes); null for the crop box. The region is intersected with the media box, and the image is turned by the /Rotate of the page as the whole page would be. |
| RenderAnnotations | Gets or initializes whether the appearances of the annotations are drawn (ISO 32000-2, 12.5.5). |
| SimulateOverprint | Gets or initializes whether overprinting is simulated (ISO 32000-2, 8.6.7), as a print preview shows it: the page is separated into the plates of its colorants (PdfRenderOptions.Plate), and the inks of the plates are combined on white paper. The process inks are cyan, magenta, yellow and black; a spot ink has the color of its alternate color space. The default is false: the page is composited in RGB, and overprinting is ignored, as viewers do for a screen. |
| TextAntialiasing | Gets or initializes whether the edges of the glyphs of the text are antialiased; false draws them with hard edges. |
| UseHalftones | Gets or initializes whether the halftones of the document (/HT and /HTO of the graphics states, ISO 32000-2, 10.6) are applied, as a printer that turns each color component fully on or off would apply them: the red, green and blue components of the colors an opaque object paints are compared with the thresholds of the screen of the halftone, in the pixels of the image. The default halftone leaves the colors as they are. When false (the default), the halftones are ignored, as viewers do for a screen. |
| UseSystemFonts | Gets or initializes whether the fonts of the system replace the fonts the document does not embed and that are not standard fonts. When it is false, they are replaced by the bundled fonts. |
| Width | Gets or initializes the width of the image, in pixels: the resolution is the one that gives the region (the crop box by default, turned by the rotation of the page) this width, instead of PdfRenderOptions.Dpi. With PdfRenderOptions.Height, the region is fitted inside both, keeping its proportions. |
Background
PdfRenderOptions.csConfiguration
PdfRenderOptions.csGets or initializes the configuration of the image the page is rendered to: its limits and allocation scope.
public ImageConfiguration? Configuration { get; init; }Property value
Default
PdfRenderOptions.csGets the default options: 72 dots per inch, a white background, the annotations, the system fonts.
public static PdfRenderOptions Default { get; }Property value
FontResolver
PdfRenderOptions.csGets or initializes the font that replaces a font the document does not embed. When it is null or returns null, a standard font is replaced by a bundled font of the same widths, another font by a font of the system, else by a bundled font of its kind.
public Func<PdfFontRequest, FontFace?>? FontResolver { get; init; }Property value
Height
PdfRenderOptions.csGets or initializes the height of the image, in pixels: the resolution is the one that gives the region (the crop box by default, turned by the rotation of the page) this height, instead of PdfRenderOptions.Dpi. With PdfRenderOptions.Width, the region is fitted inside both, keeping its proportions.
public int? Height { get; init; }Property value
Intent
PdfRenderOptions.csGets or initializes the purpose of the rendering: it selects the annotations drawn (the Print, NoView and Hidden flags) and the optional content that the usage of its groups turns on or off.
public PdfRenderIntent Intent { get; init; }Property value
MaxOperations
PdfRenderOptions.csOptionalContentConfiguration
PdfRenderOptions.csGets or initializes the name (/Name) of the optional content configuration of the document that sets which layers are visible (ISO 32000-2, 8.11.4.3); null, or a name the document does not have, for the default configuration.
public string? OptionalContentConfiguration { get; init; }Property value
OptionalContentGroupStates
PdfRenderOptions.csGets or initializes the visibility of optional content groups (layers) that replaces the one of the configuration: the keys are the names of the groups (/Name), and every group of a name is turned on or off.
public IReadOnlyDictionary<string, bool>? OptionalContentGroupStates { get; init; }Property value
PathAntialiasing
PdfRenderOptions.csPlate
PdfRenderOptions.csGets or initializes the colorant whose plate is rendered, or null (the default) for the colors of the page: Cyan, Magenta, Yellow, Black, or the name of a spot colorant of a separation or DeviceN color space. The plate is rendered in gray, as a film: black for full ink, white for none.
public string? Plate { get; init; }Property value
Remarks
Each object paints the tint of the colorant in its color, and erases the plate where its color does not have the colorant, unless it overprints (OP, op and the overprint mode OPM, 8.6.7), which leaves the plate unchanged. Gray is separated as black, RGB with a full gray component replacement. The background of the options is not painted.
Region
PdfRenderOptions.csGets or initializes the region of the page rendered, in the default user space of the page (the coordinates of its boxes); null for the crop box. The region is intersected with the media box, and the image is turned by the /Rotate of the page as the whole page would be.
public PdfRectangle? Region { get; init; }Property value
RenderAnnotations
PdfRenderOptions.csSimulateOverprint
PdfRenderOptions.csGets or initializes whether overprinting is simulated (ISO 32000-2, 8.6.7), as a print preview shows it: the page is separated into the plates of its colorants (PdfRenderOptions.Plate), and the inks of the plates are combined on white paper. The process inks are cyan, magenta, yellow and black; a spot ink has the color of its alternate color space. The default is false: the page is composited in RGB, and overprinting is ignored, as viewers do for a screen.
public bool SimulateOverprint { get; init; }Property value
Remarks
The page is rendered once per colorant, and the background of the options is not painted. The colors of the images and shadings are separated into the process colorants from their RGB colors: their spot colorants are not separated. PdfSeparations.GetColorants lists the colorants of a page.
TextAntialiasing
PdfRenderOptions.csUseHalftones
PdfRenderOptions.csGets or initializes whether the halftones of the document (/HT and /HTO of the graphics states, ISO 32000-2, 10.6) are applied, as a printer that turns each color component fully on or off would apply them: the red, green and blue components of the colors an opaque object paints are compared with the thresholds of the screen of the halftone, in the pixels of the image. The default halftone leaves the colors as they are. When false (the default), the halftones are ignored, as viewers do for a screen.
public bool UseHalftones { get; init; }Property value
Remarks
The screens are in the pixels of the image, so the result depends on the resolution. Turn PdfRenderOptions.PathAntialiasing and PdfRenderOptions.TextAntialiasing off to get only fully on or off components.
UseSystemFonts
PdfRenderOptions.csWidth
PdfRenderOptions.csGets or initializes the width of the image, in pixels: the resolution is the one that gives the region (the crop box by default, turned by the rotation of the page) this width, instead of PdfRenderOptions.Dpi. With PdfRenderOptions.Height, the region is fitted inside both, keeping its proportions.
public int? Width { get; init; }