# GrapeCity.Documents.Html.HtmlPage

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Html_HtmlPage" data-uid="GrapeCity.Documents.Html.HtmlPage" class="text-break">HtmlPage Class
</h1>
  <div class="markdown level0 summary"><p>Represents a page in a <a class="xref" href="GrapeCity.Documents.Html.GcHtmlBrowser.html">GcHtmlBrowser</a> instance.</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">HtmlPage</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></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_HtmlPage_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class HtmlPage : IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class HtmlPage
    Implements IDisposable</code></pre>
  </div>
  <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_HtmlPage_Browser" data-uid="GrapeCity.Documents.Html.HtmlPage.Browser">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.Browser.html#GrapeCity_Documents_Html_HtmlPage_Browser">Browser</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the owner <a class="xref" href="GrapeCity.Documents.Html.GcHtmlBrowser.html">GcHtmlBrowser</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_TimeoutOptions" data-uid="GrapeCity.Documents.Html.HtmlPage.TimeoutOptions">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.TimeoutOptions.html#GrapeCity_Documents_Html_HtmlPage_TimeoutOptions">TimeoutOptions</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the timeout settings for various browser operations.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</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_HtmlPage_Dispose" data-uid="GrapeCity.Documents.Html.HtmlPage.Dispose">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.Dispose.html#GrapeCity_Documents_Html_HtmlPage_Dispose">Dispose()</a>
        </td>
        <td class="markdown level1 summary"><p>Clean up any resources being used.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_EvaluateExpression__1_System_String_" data-uid="GrapeCity.Documents.Html.HtmlPage.EvaluateExpression``1(System.String)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.EvaluateExpression.html#GrapeCity_Documents_Html_HtmlPage_EvaluateExpression__1_System_String_">EvaluateExpression&lt;T&gt;(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Executes a script in the browser context.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_GetContent" data-uid="GrapeCity.Documents.Html.HtmlPage.GetContent">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.GetContent.html#GrapeCity_Documents_Html_HtmlPage_GetContent">GetContent()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the full HTML content of the page, including the doctype.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_GetContentSize" data-uid="GrapeCity.Documents.Html.HtmlPage.GetContentSize">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.GetContentSize.html#GrapeCity_Documents_Html_HtmlPage_GetContentSize">GetContentSize()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the size of page scrollable area, in pixels.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_GetTitle" data-uid="GrapeCity.Documents.Html.HtmlPage.GetTitle">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.GetTitle.html#GrapeCity_Documents_Html_HtmlPage_GetTitle">GetTitle()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the page title.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_GetWindowSize" data-uid="GrapeCity.Documents.Html.HtmlPage.GetWindowSize">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.GetWindowSize.html#GrapeCity_Documents_Html_HtmlPage_GetWindowSize">GetWindowSize()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the virtual window size, in pixels.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_Reload_GrapeCity_Documents_Html_PageLoadStates_" data-uid="GrapeCity.Documents.Html.HtmlPage.Reload(GrapeCity.Documents.Html.PageLoadStates)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.Reload.html#GrapeCity_Documents_Html_HtmlPage_Reload_GrapeCity_Documents_Html_PageLoadStates_">Reload(PageLoadStates)</a>
        </td>
        <td class="markdown level1 summary"><p>Reloads the page.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_Render_GrapeCity_Documents_Imaging_GcBitmap_GrapeCity_Documents_Html_PngOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.Render(GrapeCity.Documents.Imaging.GcBitmap,GrapeCity.Documents.Html.PngOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.Render.html#GrapeCity_Documents_Html_HtmlPage_Render_GrapeCity_Documents_Imaging_GcBitmap_GrapeCity_Documents_Html_PngOptions_">Render(GcBitmap, PngOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Renders the current page to an existing <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_RenderAndCrop_GrapeCity_Documents_Imaging_GcBitmap_GrapeCity_Documents_Html_PngOptions_System_Nullable_System_Drawing_Color__System_Int32_System_Int32_System_Int32_System_Int32_" data-uid="GrapeCity.Documents.Html.HtmlPage.RenderAndCrop(GrapeCity.Documents.Imaging.GcBitmap,GrapeCity.Documents.Html.PngOptions,System.Nullable{System.Drawing.Color},System.Int32,System.Int32,System.Int32,System.Int32)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.RenderAndCrop.html#GrapeCity_Documents_Html_HtmlPage_RenderAndCrop_GrapeCity_Documents_Imaging_GcBitmap_GrapeCity_Documents_Html_PngOptions_System_Nullable_System_Drawing_Color__System_Int32_System_Int32_System_Int32_System_Int32_">RenderAndCrop(GcBitmap, PngOptions, Color?, int, int, int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Renders the current page to an existing <a class="xref" href="../DS.Documents.Imaging/GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> and crops.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_ResetDefaultBackgroundColor" data-uid="GrapeCity.Documents.Html.HtmlPage.ResetDefaultBackgroundColor">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.ResetDefaultBackgroundColor.html#GrapeCity_Documents_Html_HtmlPage_ResetDefaultBackgroundColor">ResetDefaultBackgroundColor()</a>
        </td>
        <td class="markdown level1 summary"><p>Clears an override of the default background color.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_SaveAsJpeg_System_IO_Stream_GrapeCity_Documents_Html_JpegOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.SaveAsJpeg(System.IO.Stream,GrapeCity.Documents.Html.JpegOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.SaveAsJpeg.html#GrapeCity_Documents_Html_HtmlPage_SaveAsJpeg_System_IO_Stream_GrapeCity_Documents_Html_JpegOptions_">SaveAsJpeg(Stream, JpegOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Saves the current page to a stream in JPEG format.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_SaveAsJpeg_System_String_GrapeCity_Documents_Html_JpegOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.SaveAsJpeg(System.String,GrapeCity.Documents.Html.JpegOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.SaveAsJpeg.html#GrapeCity_Documents_Html_HtmlPage_SaveAsJpeg_System_String_GrapeCity_Documents_Html_JpegOptions_">SaveAsJpeg(string, JpegOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Saves the current web page as a JPEG image file.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_SaveAsPdf_System_IO_Stream_GrapeCity_Documents_Html_PdfOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.SaveAsPdf(System.IO.Stream,GrapeCity.Documents.Html.PdfOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.SaveAsPdf.html#GrapeCity_Documents_Html_HtmlPage_SaveAsPdf_System_IO_Stream_GrapeCity_Documents_Html_PdfOptions_">SaveAsPdf(Stream, PdfOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Saves the current page to a stream in PDF format.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_SaveAsPdf_System_String_GrapeCity_Documents_Html_PdfOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.SaveAsPdf(System.String,GrapeCity.Documents.Html.PdfOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.SaveAsPdf.html#GrapeCity_Documents_Html_HtmlPage_SaveAsPdf_System_String_GrapeCity_Documents_Html_PdfOptions_">SaveAsPdf(string, PdfOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a PDF file from the current page.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_SaveAsPng_System_IO_Stream_GrapeCity_Documents_Html_PngOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.SaveAsPng(System.IO.Stream,GrapeCity.Documents.Html.PngOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.SaveAsPng.html#GrapeCity_Documents_Html_HtmlPage_SaveAsPng_System_IO_Stream_GrapeCity_Documents_Html_PngOptions_">SaveAsPng(Stream, PngOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Saves the current page to a stream in PNG format.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_SaveAsPng_System_String_GrapeCity_Documents_Html_PngOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.SaveAsPng(System.String,GrapeCity.Documents.Html.PngOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.SaveAsPng.html#GrapeCity_Documents_Html_HtmlPage_SaveAsPng_System_String_GrapeCity_Documents_Html_PngOptions_">SaveAsPng(string, PngOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Saves the current page as a PNG image file.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_SaveAsWebp_System_IO_Stream_GrapeCity_Documents_Html_WebpOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.SaveAsWebp(System.IO.Stream,GrapeCity.Documents.Html.WebpOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.SaveAsWebp.html#GrapeCity_Documents_Html_HtmlPage_SaveAsWebp_System_IO_Stream_GrapeCity_Documents_Html_WebpOptions_">SaveAsWebp(Stream, WebpOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Saves the current page to a stream in WEBP format.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_SaveAsWebp_System_String_GrapeCity_Documents_Html_WebpOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.SaveAsWebp(System.String,GrapeCity.Documents.Html.WebpOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.SaveAsWebp.html#GrapeCity_Documents_Html_HtmlPage_SaveAsWebp_System_String_GrapeCity_Documents_Html_WebpOptions_">SaveAsWebp(string, WebpOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Saves the current page as a WEBP image file.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_SetContent_System_String_GrapeCity_Documents_Html_PageLoadStates_" data-uid="GrapeCity.Documents.Html.HtmlPage.SetContent(System.String,GrapeCity.Documents.Html.PageLoadStates)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.SetContent.html#GrapeCity_Documents_Html_HtmlPage_SetContent_System_String_GrapeCity_Documents_Html_PageLoadStates_">SetContent(string, PageLoadStates)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the HTML markup to the page.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_SetDefaultBackgroundColor_System_Drawing_Color_" data-uid="GrapeCity.Documents.Html.HtmlPage.SetDefaultBackgroundColor(System.Drawing.Color)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.SetDefaultBackgroundColor.html#GrapeCity_Documents_Html_HtmlPage_SetDefaultBackgroundColor_System_Drawing_Color_">SetDefaultBackgroundColor(Color)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the background color to be used if the HTML markup doesn't specify one.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_SetWindowSize_System_Drawing_Size_" data-uid="GrapeCity.Documents.Html.HtmlPage.SetWindowSize(System.Drawing.Size)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.SetWindowSize.html#GrapeCity_Documents_Html_HtmlPage_SetWindowSize_System_Drawing_Size_">SetWindowSize(Size)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the virtual window size, in pixels.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_ToJpegBytes_GrapeCity_Documents_Html_JpegOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.ToJpegBytes(GrapeCity.Documents.Html.JpegOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.ToJpegBytes.html#GrapeCity_Documents_Html_HtmlPage_ToJpegBytes_GrapeCity_Documents_Html_JpegOptions_">ToJpegBytes(JpegOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Renders the current page to an image in JPEG format and returns it as a byte array.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_ToPdfBytes_GrapeCity_Documents_Html_PdfOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.ToPdfBytes(GrapeCity.Documents.Html.PdfOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.ToPdfBytes.html#GrapeCity_Documents_Html_HtmlPage_ToPdfBytes_GrapeCity_Documents_Html_PdfOptions_">ToPdfBytes(PdfOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Renders the current page to a PDF document and returns it as a byte array.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_ToPngBytes_GrapeCity_Documents_Html_PngOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.ToPngBytes(GrapeCity.Documents.Html.PngOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.ToPngBytes.html#GrapeCity_Documents_Html_HtmlPage_ToPngBytes_GrapeCity_Documents_Html_PngOptions_">ToPngBytes(PngOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Renders the current page to an image in PNG format and returns it as a byte array.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_ToWebpBytes_GrapeCity_Documents_Html_WebpOptions_" data-uid="GrapeCity.Documents.Html.HtmlPage.ToWebpBytes(GrapeCity.Documents.Html.WebpOptions)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.ToWebpBytes.html#GrapeCity_Documents_Html_HtmlPage_ToWebpBytes_GrapeCity_Documents_Html_WebpOptions_">ToWebpBytes(WebpOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Renders the current page to an image in WEBP format and returns it as a byte array.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Html_HtmlPage_WaitForNetworkIdle_System_Int32_System_Int32_" data-uid="GrapeCity.Documents.Html.HtmlPage.WaitForNetworkIdle(System.Int32,System.Int32)">
          <a class="xref" href="GrapeCity.Documents.Html.HtmlPage.WaitForNetworkIdle.html#GrapeCity_Documents_Html_HtmlPage_WaitForNetworkIdle_System_Int32_System_Int32_">WaitForNetworkIdle(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Waits for network idle during the specified amount of time.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
