# C1.WPF.RichTextBox.Documents.HtmlFilter.ConvertFromDocument

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_RichTextBox_Documents_HtmlFilter_ConvertFromDocument_" data-uid="C1.WPF.RichTextBox.Documents.HtmlFilter.ConvertFromDocument*">ConvertFromDocument Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_RichTextBox_Documents_HtmlFilter_ConvertFromDocument_" data-uid="C1.WPF.RichTextBox.Documents.HtmlFilter.ConvertFromDocument*"></a>
<h4 id="C1_WPF_RichTextBox_Documents_HtmlFilter_ConvertFromDocument_C1_WPF_RichTextBox_Documents_C1Document_" data-uid="C1.WPF.RichTextBox.Documents.HtmlFilter.ConvertFromDocument(C1.WPF.RichTextBox.Documents.C1Document)">ConvertFromDocument(C1Document)</h4>
<div class="markdown level1 summary"><p>Creates a string representation of a <a class="xref" href="C1.WPF.RichTextBox.Documents.C1Document.html">C1Document</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public string ConvertFromDocument(C1Document doc)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ConvertFromDocument(doc As C1Document) As String</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="C1.WPF.RichTextBox.Documents.C1Document.html">C1Document</a></td>
      <td><span class="parametername">doc</span></td>
      <td><p><a class="xref" href="C1.WPF.RichTextBox.Documents.C1Document.html">C1Document</a> to convert into a string.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><p>A string containing an HTML representation of the document.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_RichTextBox_Documents_HtmlFilter_ConvertFromDocument_" data-uid="C1.WPF.RichTextBox.Documents.HtmlFilter.ConvertFromDocument*"></a>
<h4 id="C1_WPF_RichTextBox_Documents_HtmlFilter_ConvertFromDocument_C1_WPF_RichTextBox_Documents_C1Document_C1_WPF_RichTextBox_Documents_HtmlEncoding_" data-uid="C1.WPF.RichTextBox.Documents.HtmlFilter.ConvertFromDocument(C1.WPF.RichTextBox.Documents.C1Document,C1.WPF.RichTextBox.Documents.HtmlEncoding)">ConvertFromDocument(C1Document, HtmlEncoding)</h4>
<div class="markdown level1 summary"><p>Creates a string representation of a <a class="xref" href="C1.WPF.RichTextBox.Documents.C1Document.html">C1Document</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public string ConvertFromDocument(C1Document doc, HtmlEncoding encoding)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ConvertFromDocument(doc As C1Document, encoding As HtmlEncoding) As String</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="C1.WPF.RichTextBox.Documents.C1Document.html">C1Document</a></td>
      <td><span class="parametername">doc</span></td>
      <td><p><a class="xref" href="C1.WPF.RichTextBox.Documents.C1Document.html">C1Document</a> to convert into a string.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.RichTextBox.Documents.HtmlEncoding.html">HtmlEncoding</a></td>
      <td><span class="parametername">encoding</span></td>
      <td><p>The <a class="xref" href="C1.WPF.RichTextBox.Documents.HtmlEncoding.html">HtmlEncoding</a> used to encode styles in the HTML document.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><p>A string containing an HTML representation of the document.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
