# C1.Document.C1DocumentSource.GetDocumentRange

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Document_C1DocumentSource_GetDocumentRange_" data-uid="C1.Document.C1DocumentSource.GetDocumentRange*">GetDocumentRange Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Document_C1DocumentSource_GetDocumentRange_" data-uid="C1.Document.C1DocumentSource.GetDocumentRange*"></a>
<h4 id="C1_Document_C1DocumentSource_GetDocumentRange_C1_Document_C1DocumentTextPosition_C1_Document_C1DocumentTextPosition_C1_Document_Util_IC1TextMeasurementContext_" data-uid="C1.Document.C1DocumentSource.GetDocumentRange(C1.Document.C1DocumentTextPosition,C1.Document.C1DocumentTextPosition,C1.Document.Util.IC1TextMeasurementContext)">GetDocumentRange(C1DocumentTextPosition, C1DocumentTextPosition, IC1TextMeasurementContext)</h4>
<div class="markdown level1 summary"><p>Creates the <span class="xref">C1.Document.C1DocumentRange</span> object on the base of two text positions specified
by <span class="xref">C1.Document.C1DocumentTextPosition</span> objects.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual C1DocumentRange GetDocumentRange(C1DocumentTextPosition startPosition, C1DocumentTextPosition endPosition, IC1TextMeasurementContext textMeasurementContext)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Function GetDocumentRange(startPosition As C1DocumentTextPosition, endPosition As C1DocumentTextPosition, textMeasurementContext As IC1TextMeasurementContext) As C1DocumentRange</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><span class="xref">C1DocumentTextPosition</span></td>
      <td><span class="parametername">startPosition</span></td>
      <td><p>Start position for the document range.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">C1DocumentTextPosition</span></td>
      <td><span class="parametername">endPosition</span></td>
      <td><p>End position for the document range.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">IC1TextMeasurementContext</span></td>
      <td><span class="parametername">textMeasurementContext</span></td>
      <td><p>The <span class="xref">C1.Document.Util.IC1TextMeasurementContext</span> to use while building <span class="xref">C1.Document.C1DocumentRange</span>.</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><span class="xref">C1DocumentRange</span></td>
      <td><p><span class="xref">C1.Document.C1DocumentRange</span> defining document range.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
