# GrapeCity.Documents.Drawing.HtmlToImageFormat.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Drawing_HtmlToImageFormat__ctor_" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.#ctor*">HtmlToImageFormat Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Drawing_HtmlToImageFormat__ctor_" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.#ctor*"></a>
<h4 id="GrapeCity_Documents_Drawing_HtmlToImageFormat__ctor_System_Boolean_System_Boolean_" data-uid="GrapeCity.Documents.Drawing.HtmlToImageFormat.#ctor(System.Boolean,System.Boolean)">HtmlToImageFormat(bool, bool)</h4>
<div 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>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public HtmlToImageFormat(bool fullPage, bool trimMargins = true)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(fullPage As Boolean, Optional trimMargins As Boolean = True)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">fullPage</span></td>
      <td><p>Specifies whether to render the whole page.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">trimMargins</span></td>
      <td><p>Specifies whether to trim image margins.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Documents_Drawing_HtmlToImageFormat__ctor_System_Boolean_System_Boolean__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.FullPage.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_FullPage">FullPage</a></div>
    <div><a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxTopMargin.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxTopMargin">MaxTopMargin</a></div>
    <div><a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxBottomMargin.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxBottomMargin">MaxBottomMargin</a></div>
    <div><a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxLeftMargin.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxLeftMargin">MaxLeftMargin</a></div>
    <div><a class="xref" href="GrapeCity.Documents.Drawing.HtmlToImageFormat.MaxRightMargin.html#GrapeCity_Documents_Drawing_HtmlToImageFormat_MaxRightMargin">MaxRightMargin</a></div>
</div>
</div>
