# GrapeCity.Documents.Pdf.TextMap.ITextMap.GetFragment

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Pdf_TextMap_ITextMap_GetFragment_" data-uid="GrapeCity.Documents.Pdf.TextMap.ITextMap.GetFragment*">GetFragment Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Pdf_TextMap_ITextMap_GetFragment_" data-uid="GrapeCity.Documents.Pdf.TextMap.ITextMap.GetFragment*"></a>
<h4 id="GrapeCity_Documents_Pdf_TextMap_ITextMap_GetFragment_GrapeCity_Documents_Pdf_TextMap_MapPos_GrapeCity_Documents_Pdf_TextMap_MapPos_GrapeCity_Documents_Pdf_TextMap_TextMapFragment__System_String__" data-uid="GrapeCity.Documents.Pdf.TextMap.ITextMap.GetFragment(GrapeCity.Documents.Pdf.TextMap.MapPos,GrapeCity.Documents.Pdf.TextMap.MapPos,GrapeCity.Documents.Pdf.TextMap.TextMapFragment@,System.String@)">GetFragment(MapPos, MapPos, out TextMapFragment, out string)</h4>
<div class="markdown level1 summary"><p>Gets a <a class="xref" href="GrapeCity.Documents.Pdf.TextMap.TextMapFragment.html">TextMapFragment</a> that represents the text
within a specified range (from <code class="paramref">startPos</code> to <code class="paramref">endPos</code>).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void GetFragment(MapPos startPos, MapPos endPos, out TextMapFragment fragment, out string text)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub GetFragment(startPos As MapPos, endPos As MapPos, ByRef fragment As TextMapFragment, ByRef text 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.TextMap.MapPos.html">MapPos</a></td>
      <td><span class="parametername">startPos</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Pdf.TextMap.MapPos.html">MapPos</a> specifying the start of the range.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Pdf.TextMap.MapPos.html">MapPos</a></td>
      <td><span class="parametername">endPos</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Pdf.TextMap.MapPos.html">MapPos</a> specifying the end of the range.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Pdf.TextMap.TextMapFragment.html">TextMapFragment</a></td>
      <td><span class="parametername">fragment</span></td>
      <td><p>OUT: a <a class="xref" href="GrapeCity.Documents.Pdf.TextMap.TextMapFragment.html">TextMapFragment</a> representing the text in the range.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>OUT: the fragment's text.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Pdf_TextMap_ITextMap_GetFragment_" data-uid="GrapeCity.Documents.Pdf.TextMap.ITextMap.GetFragment*"></a>
<h4 id="GrapeCity_Documents_Pdf_TextMap_ITextMap_GetFragment_GrapeCity_Documents_Pdf_TextMap_TextMapFragment__System_String__" data-uid="GrapeCity.Documents.Pdf.TextMap.ITextMap.GetFragment(GrapeCity.Documents.Pdf.TextMap.TextMapFragment@,System.String@)">GetFragment(out TextMapFragment, out string)</h4>
<div class="markdown level1 summary"><p>Gets a <a class="xref" href="GrapeCity.Documents.Pdf.TextMap.TextMapFragment.html">TextMapFragment</a> that represents the text of the whole page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void GetFragment(out TextMapFragment fragment, out string text)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub GetFragment(ByRef fragment As TextMapFragment, ByRef text 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.TextMap.TextMapFragment.html">TextMapFragment</a></td>
      <td><span class="parametername">fragment</span></td>
      <td><p>OUT: a <a class="xref" href="GrapeCity.Documents.Pdf.TextMap.TextMapFragment.html">TextMapFragment</a> representing the text on the page.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>OUT: the fragment's text.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
