# GrapeCity.Documents.Drawing.HtmlToImageFormat

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Drawing_HtmlToImageFormat" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat" class="text-break">HtmlToImageFormat Class
</h1>
  <div class="markdown level0 summary"><p>Represents the formatting attributes for rendering HTML to <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmapGraphics.html">GcBitmapGraphics</a>.</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">HtmlToImageFormat</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Drawing.html">GrapeCity.Documents.Drawing</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Html.dll</h6>
  <h5 id="GrapeCity_Documents_Drawing_HtmlToImageFormat_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class HtmlToImageFormat</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class HtmlToImageFormat</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_Drawing_HtmlToImageFormat__ctor_System_Boolean_System_Boolean_" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.#ctor(System.Boolean,System.Boolean)">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.-ctor.html#GrapeCity_Documents_Drawing_HtmlToImageFormat__ctor_System_Boolean_System_Boolean_">HtmlToImageFormat(bool, bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.html">HtmlToImageFormat</a>.</p>
<p>
If <code class="paramref">fullPage</code> is true, the resulting image size will be calculated automatically
to include all page content. The minimal size will be determined by <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.WindowSize.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_WindowSize">WindowSize</a>.
</p>
<p>
If <code class="paramref">fullPage</code> is false, the maximum resulting image size will be determined
by <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxWindowWidth.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxWindowWidth">MaxWindowWidth</a> and <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxWindowHeight.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxWindowHeight">MaxWindowHeight</a> (possibly clipping some content).
</p>
</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_Drawing_HtmlToImageFormat_Clip" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.Clip">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.Clip.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_Clip">Clip</a>
        </td>
        <td class="markdown level1 summary"><p>If set, captures the specified rectangular region only (in pixels).</p>
<p>
Note that this property is ignored if <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.FullPage.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_FullPage">FullPage</a> is true.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Drawing_HtmlToImageFormat_DefaultBackgroundColor" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.DefaultBackgroundColor">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.DefaultBackgroundColor.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_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_Drawing_HtmlToImageFormat_FullPage" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.FullPage">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.FullPage.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_FullPage">FullPage</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether the full HTML page should be captured.</p>
<p>
Note that if this property is true, <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxWindowWidth.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxWindowWidth">MaxWindowWidth</a>, <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxWindowHeight.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxWindowHeight">MaxWindowHeight</a>
and <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.Clip.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_Clip">Clip</a> are ignored.
</p>
<p>
Conversely, if this property is false, <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.WindowSize.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_WindowSize">WindowSize</a> is ignored.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxBottomMargin" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxBottomMargin">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxBottomMargin.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxBottomMargin">MaxBottomMargin</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the maximum height of the bottom margin, in pixels.
Negative value prevents trimming the bottom margin.
Defaults to 0 (no bottom margin).</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxLeftMargin" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxLeftMargin">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxLeftMargin.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxLeftMargin">MaxLeftMargin</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the maximum width of the left margin, in pixels.
Negative value prevents trimming the left margin.
Defaults to 0 (no left margin).</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxRightMargin" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxRightMargin">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxRightMargin.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxRightMargin">MaxRightMargin</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the maximum width of the right margin, in pixels.
Negative value prevents trimming the right margin.
Defaults to 0 (no right margin).</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxTopMargin" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxTopMargin">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxTopMargin.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxTopMargin">MaxTopMargin</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the maximum height of the top margin, in pixels.
Negative value prevents trimming the top margin.
Defaults to 0 (no top margin).</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxWindowHeight" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxWindowHeight">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxWindowHeight.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxWindowHeight">MaxWindowHeight</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the maximum window height, in pixels. Defaults to 1600.</p>
<p>
Note that this property is ignored if <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.FullPage.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_FullPage">FullPage</a> is true.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxWindowWidth" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxWindowWidth">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxWindowWidth.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxWindowWidth">MaxWindowWidth</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the maximum window width, in pixels. Defaults to 1200.</p>
<p>
Note that this property is ignored if <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.FullPage.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_FullPage">FullPage</a> is true.
</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Drawing_HtmlToImageFormat_Scale" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.Scale">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.Scale.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_Scale">Scale</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the scale factor. Defaults to 1.0.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Drawing_HtmlToImageFormat_WindowSize" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.WindowSize">
          <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.WindowSize.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_WindowSize">WindowSize</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the minimal window size before trimming margins, in pixels. Defaults to 800 x 600.</p>
<p>
Note that this property is ignored if <a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.FullPage.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_FullPage">FullPage</a> is false.
</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
