# GrapeCity.Documents.Pdf.GcPdfDocument.GetText

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Pdf_GcPdfDocument_GetText_" data-uid="GrapeCity.Documents.Pdf.GcPdfDocument.GetText*">GetText Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Pdf_GcPdfDocument_GetText_" data-uid="GrapeCity.Documents.Pdf.GcPdfDocument.GetText*"></a>
<h4 id="GrapeCity_Documents_Pdf_GcPdfDocument_GetText_GrapeCity_Documents_Pdf_Layers_ViewState_System_Boolean_" data-uid="GrapeCity.Documents.Pdf.GcPdfDocument.GetText(GrapeCity.Documents.Pdf.Layers.ViewState,System.Boolean)">GetText(ViewState, bool)</h4>
<div class="markdown level1 summary"><p>Extracts and returns all text from the current document.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public string GetText(ViewState viewState, bool ignoreErrors = true)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetText(viewState As ViewState, Optional ignoreErrors As Boolean = True) 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="GrapeCity.Documents.Pdf.Layers.ViewState.html">ViewState</a></td>
      <td><span class="parametername">viewState</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Pdf.Layers.ViewState.html">ViewState</a> used to determine what document content would be considered.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">ignoreErrors</span></td>
      <td><p>Indicates whether to ignore errors in PDF during processing.</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>All text in the current document.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Pdf_GcPdfDocument_GetText_" data-uid="GrapeCity.Documents.Pdf.GcPdfDocument.GetText*"></a>
<h4 id="GrapeCity_Documents_Pdf_GcPdfDocument_GetText_System_Boolean_" data-uid="GrapeCity.Documents.Pdf.GcPdfDocument.GetText(System.Boolean)">GetText(bool)</h4>
<div class="markdown level1 summary"><p>Extracts and returns all text from the current document.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public string GetText(bool ignoreErrors = true)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetText(Optional ignoreErrors As Boolean = True) 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="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">ignoreErrors</span></td>
      <td><p>Indicates whether to ignore errors in PDF during processing.</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>All text in the current document.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
