[]
Represents output settings for rendering HTML to PDF.
[Obsolete("Use GcHtmlBrowser with HtmlPage and PdfOptions instead.")]
public class PdfSettings
public PdfSettings()
Gets or sets the background color to be used if the HTML page doesn't specify one. Defaults to White color.
public Color DefaultBackgroundColor { get; set; }
Gets or sets a value indicating whether the background graphics should be rendered. Defaults to true.
public bool DisplayBackgroundGraphics { get; set; }
Gets or sets a value indicating whether the header and footer are rendered. Defaults to false.
Note that this property is ignored if FullPage is true.
public bool DisplayHeaderFooter { get; set; }
Gets or sets the HTML template for the page footer.
This should be a valid HTML markup that may include the following special classes used to inject print values:
For example, "<span class='title'></span>" would generate a span containing the document title.
public string FooterTemplate { get; set; }
Gets or sets a value indicating whether the whole HTML page should be rendered as a single PDF page. Defaults to false.
Note that if this property is true, the following properties are ignored: Landscape, PageWidth, PageHeight, IgnoreCSSPageSize, Margins, PageRanges, DisplayHeaderFooter, HeaderTemplate and FooterTemplate.
public bool FullPage { get; set; }
Gets or sets the HTML template for the page header.
This should be a valid HTML markup that may include the following special classes used to inject print values:
For example, "<span class='title'></span>" would generate a span containing the document title.
public string HeaderTemplate { get; set; }
Gets or sets a value indicating whether the CSS-defined page size should be ignored. Defaults to false.
Note that this property is ignored if FullPage is true.
public bool IgnoreCSSPageSize { get; set; }
Gets or sets a value indicating whether the paper orientation is Landscape. Defaults to false.
Note that this property is ignored if FullPage is true.
public bool Landscape { get; set; }
Gets or sets page margins, in inches. Defaults to no margins.
Note that this property is ignored if FullPage is true.
public Margins Margins { get; set; }
Gets or sets the page height, in inches. If unspecified, 11 inches is used.
Note that this property is ignored if FullPage is true.
public float? PageHeight { get; set; }
Gets or sets the range of pages to render, e.g., '1-5, 8, 11-13'. Defaults to all pages.
Note that this property is ignored if FullPage is true.
public string PageRanges { get; set; }
Gets or sets the page width, in inches. If unspecified, 8.5 inches is used.
Note that this property is ignored if FullPage is true.
public float? PageWidth { get; set; }
Gets or sets the scale factor, from 0.1 to 2.0. Defaults to 1.0.
public float Scale { get; set; }
Gets or sets a value indicating whether a tagged (accessible) PDF is generated. Defaults to true.
public bool TaggedPdf { get; set; }
Gets or sets the virtual window size, in pixels. Defaults to 800 x 600.
public Size WindowSize { get; set; }