# GrapeCity.Documents.Html.PdfSettings

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Html_PdfSettings" data-uid="GrapeCity.Documents.Html.PdfSettings" class="text-break">PdfSettings Class
</h1>
  <div class="markdown level0 summary"><p>Represents output settings for rendering HTML to PDF.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">PdfSettings</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Html.html">GrapeCity.Documents.Html</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Html.dll</h6>
  <h5 id="GrapeCity_Documents_Html_PdfSettings_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[Obsolete(&quot;Use GcHtmlBrowser with HtmlPage and PdfOptions instead.&quot;)]
public class PdfSettings</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;Use GcHtmlBrowser with HtmlPage and PdfOptions instead.&quot;)&gt;
Public Class PdfSettings</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings__ctor" data-uid="GrapeCity.Documents.Html.PdfSettings.#ctor">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.-ctor.html#GrapeCity_Documents_Html_PdfSettings__ctor">PdfSettings()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_DefaultBackgroundColor" data-uid="GrapeCity.Documents.Html.PdfSettings.DefaultBackgroundColor">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.DefaultBackgroundColor.html#GrapeCity_Documents_Html_PdfSettings_DefaultBackgroundColor">DefaultBackgroundColor</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the background color to be used if the HTML page doesn't specify one. Defaults to White color.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_DisplayBackgroundGraphics" data-uid="GrapeCity.Documents.Html.PdfSettings.DisplayBackgroundGraphics">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.DisplayBackgroundGraphics.html#GrapeCity_Documents_Html_PdfSettings_DisplayBackgroundGraphics">DisplayBackgroundGraphics</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the background graphics should be rendered. Defaults to true.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_DisplayHeaderFooter" data-uid="GrapeCity.Documents.Html.PdfSettings.DisplayHeaderFooter">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.DisplayHeaderFooter.html#GrapeCity_Documents_Html_PdfSettings_DisplayHeaderFooter">DisplayHeaderFooter</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the header and footer are rendered. Defaults to false.</p>
<p>
Note that this property is ignored if <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.FullPage.html#GrapeCity_Documents_Html_PdfSettings_FullPage">FullPage</a> is true.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_FooterTemplate" data-uid="GrapeCity.Documents.Html.PdfSettings.FooterTemplate">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.FooterTemplate.html#GrapeCity_Documents_Html_PdfSettings_FooterTemplate">FooterTemplate</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the HTML template for the page footer.</p>
<p>
This should be a valid HTML markup that may include the following special classes
used to inject print values:
</p>
<ul><li><span class="term">'date'</span>formatted print date</li><li><span class="term">'title'</span>document title</li><li><span class="term">'url'</span>document location</li><li><span class="term">'pageNumber'</span>current page number</li><li><span class="term">'totalPages'</span>total pages in the document</li></ul>
<p>
For example, "&lt;span class='title'&gt;&lt;/span&gt;" would generate a span containing the document title.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_FullPage" data-uid="GrapeCity.Documents.Html.PdfSettings.FullPage">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.FullPage.html#GrapeCity_Documents_Html_PdfSettings_FullPage">FullPage</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the whole HTML page should be rendered as a single PDF page. Defaults to false.</p>
<p>
Note that if this property is true, the following properties are ignored:
<a class="xref" href="GrapeCity.Documents.Html.PdfSettings.Landscape.html#GrapeCity_Documents_Html_PdfSettings_Landscape">Landscape</a>, <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.PageWidth.html#GrapeCity_Documents_Html_PdfSettings_PageWidth">PageWidth</a>, <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.PageHeight.html#GrapeCity_Documents_Html_PdfSettings_PageHeight">PageHeight</a>,
<a class="xref" href="GrapeCity.Documents.Html.PdfSettings.IgnoreCSSPageSize.html#GrapeCity_Documents_Html_PdfSettings_IgnoreCSSPageSize">IgnoreCSSPageSize</a>, <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.Margins.html#GrapeCity_Documents_Html_PdfSettings_Margins">Margins</a>, <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.PageRanges.html#GrapeCity_Documents_Html_PdfSettings_PageRanges">PageRanges</a>,
<a class="xref" href="GrapeCity.Documents.Html.PdfSettings.DisplayHeaderFooter.html#GrapeCity_Documents_Html_PdfSettings_DisplayHeaderFooter">DisplayHeaderFooter</a>, <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.HeaderTemplate.html#GrapeCity_Documents_Html_PdfSettings_HeaderTemplate">HeaderTemplate</a> and <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.FooterTemplate.html#GrapeCity_Documents_Html_PdfSettings_FooterTemplate">FooterTemplate</a>.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_HeaderTemplate" data-uid="GrapeCity.Documents.Html.PdfSettings.HeaderTemplate">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.HeaderTemplate.html#GrapeCity_Documents_Html_PdfSettings_HeaderTemplate">HeaderTemplate</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the HTML template for the page header.</p>
<p>
This should be a valid HTML markup that may include the following special classes
used to inject print values:
</p>
<ul><li><span class="term">'date'</span>formatted print date</li><li><span class="term">'title'</span>document title</li><li><span class="term">'url'</span>document location</li><li><span class="term">'pageNumber'</span>current page number</li><li><span class="term">'totalPages'</span>total pages in the document</li></ul>
<p>
For example, "&lt;span class='title'&gt;&lt;/span&gt;" would generate a span containing the document title.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_IgnoreCSSPageSize" data-uid="GrapeCity.Documents.Html.PdfSettings.IgnoreCSSPageSize">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.IgnoreCSSPageSize.html#GrapeCity_Documents_Html_PdfSettings_IgnoreCSSPageSize">IgnoreCSSPageSize</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the CSS-defined page size should be ignored. Defaults to false.</p>
<p>
Note that this property is ignored if <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.FullPage.html#GrapeCity_Documents_Html_PdfSettings_FullPage">FullPage</a> is true.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_Landscape" data-uid="GrapeCity.Documents.Html.PdfSettings.Landscape">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.Landscape.html#GrapeCity_Documents_Html_PdfSettings_Landscape">Landscape</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the paper orientation is Landscape. Defaults to false.</p>
<p>
Note that this property is ignored if <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.FullPage.html#GrapeCity_Documents_Html_PdfSettings_FullPage">FullPage</a> is true.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_Margins" data-uid="GrapeCity.Documents.Html.PdfSettings.Margins">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.Margins.html#GrapeCity_Documents_Html_PdfSettings_Margins">Margins</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets page margins, in inches. Defaults to no margins.</p>
<p>
Note that this property is ignored if <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.FullPage.html#GrapeCity_Documents_Html_PdfSettings_FullPage">FullPage</a> is true.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_PageHeight" data-uid="GrapeCity.Documents.Html.PdfSettings.PageHeight">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.PageHeight.html#GrapeCity_Documents_Html_PdfSettings_PageHeight">PageHeight</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the page height, in inches. If unspecified, 11 inches is used.</p>
<p>
Note that this property is ignored if <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.FullPage.html#GrapeCity_Documents_Html_PdfSettings_FullPage">FullPage</a> is true.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_PageRanges" data-uid="GrapeCity.Documents.Html.PdfSettings.PageRanges">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.PageRanges.html#GrapeCity_Documents_Html_PdfSettings_PageRanges">PageRanges</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the range of pages to render, e.g., '1-5, 8, 11-13'. Defaults to all pages.</p>
<p>
Note that this property is ignored if <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.FullPage.html#GrapeCity_Documents_Html_PdfSettings_FullPage">FullPage</a> is true.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_PageWidth" data-uid="GrapeCity.Documents.Html.PdfSettings.PageWidth">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.PageWidth.html#GrapeCity_Documents_Html_PdfSettings_PageWidth">PageWidth</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the page width, in inches. If unspecified, 8.5 inches is used.</p>
<p>
Note that this property is ignored if <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.FullPage.html#GrapeCity_Documents_Html_PdfSettings_FullPage">FullPage</a> is true.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_Scale" data-uid="GrapeCity.Documents.Html.PdfSettings.Scale">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.Scale.html#GrapeCity_Documents_Html_PdfSettings_Scale">Scale</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the scale factor, from 0.1 to 2.0. Defaults to 1.0.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_TaggedPdf" data-uid="GrapeCity.Documents.Html.PdfSettings.TaggedPdf">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.TaggedPdf.html#GrapeCity_Documents_Html_PdfSettings_TaggedPdf">TaggedPdf</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether a tagged (accessible) PDF is generated. Defaults to true.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_PdfSettings_WindowSize" data-uid="GrapeCity.Documents.Html.PdfSettings.WindowSize">
          <a class="xref" href="GrapeCity.Documents.Html.PdfSettings.WindowSize.html#GrapeCity_Documents_Html_PdfSettings_WindowSize">WindowSize</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the virtual window size, in pixels. Defaults to 800 x 600.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
