# C1.Document.C1PdfDocumentSource

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Document_C1PdfDocumentSource" data-uid="C1.Document.C1PdfDocumentSource" class="text-break">C1PdfDocumentSource Class
</h1>
  <div class="markdown level0 summary"><p>Represents a document source which loads and renders PDF documents.</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"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.marshalbyrefobject">MarshalByRefObject</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.component">Component</a></div>
    <div class="level3"><a class="xref" href="C1.Document.C1DocumentSource.html">C1DocumentSource</a></div>
    <div class="level4"><span class="xref">C1PdfDocumentSource</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.icomponent">IComponent</a></div>
    <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="C1.Document.html">C1.Document</a></h6>
  <h6><strong>Assembly</strong>: C1.Document.dll</h6>
  <h5 id="C1_Document_C1PdfDocumentSource_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[C1Description(&quot;C1PdfDocumentSource&quot;, &quot;Represents a document source to access a PDF document.&quot;)]
public class C1PdfDocumentSource : C1DocumentSource, IComponent, IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;C1Description(&quot;C1PdfDocumentSource&quot;, &quot;Represents a document source to access a PDF document.&quot;)&gt;
Public Class C1PdfDocumentSource
    Inherits C1DocumentSource
    Implements IComponent, IDisposable</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource__ctor" data-uid="C1.Document.C1PdfDocumentSource.#ctor">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.-ctor.html#C1_Document_C1PdfDocumentSource__ctor">C1PdfDocumentSource()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Document.C1PdfDocumentSource.html">C1PdfDocumentSource</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource__ctor_System_ComponentModel_IContainer_" data-uid="C1.Document.C1PdfDocumentSource.#ctor(System.ComponentModel.IContainer)">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.-ctor.html#C1_Document_C1PdfDocumentSource__ctor_System_ComponentModel_IContainer_">C1PdfDocumentSource(IContainer)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Document.C1PdfDocumentSource.html">C1PdfDocumentSource</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <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="C1_Document_C1PdfDocumentSource_Credential" data-uid="C1.Document.C1PdfDocumentSource.Credential">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.Credential.html#C1_Document_C1PdfDocumentSource_Credential">Credential</a>
        </td>
        <td class="markdown level1 summary"><p>Overridden. Gets or sets <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.net.networkcredential">NetworkCredential</a> object defining credentials used in the PDF Document.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_Document" data-uid="C1.Document.C1PdfDocumentSource.Document">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.Document.html#C1_Document_C1PdfDocumentSource_Document">Document</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a <a class="xref" href="C1.Document.C1Document.html">C1Document</a> object produced by the current document source.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_DocumentLocation" data-uid="C1.Document.C1PdfDocumentSource.DocumentLocation">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.DocumentLocation.html#C1_Document_C1PdfDocumentSource_DocumentLocation">DocumentLocation</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the location of the PDF document.
Assigning a new value to this property will reset <a class="xref" href="C1.Document.C1PdfDocumentSource.Stream.html#C1_Document_C1PdfDocumentSource_Stream">Stream</a> to null.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_DocumentName" data-uid="C1.Document.C1PdfDocumentSource.DocumentName">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.DocumentName.html#C1_Document_C1PdfDocumentSource_DocumentName">DocumentName</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a name of the document.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_Features" data-uid="C1.Document.C1PdfDocumentSource.Features">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.Features.html#C1_Document_C1PdfDocumentSource_Features">Features</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="C1.Document.C1DocumentSourceFeatures.html">C1DocumentSourceFeatures</a> object specifying the set of features supported by this <a class="xref" href="C1.Document.C1DocumentSource.html">C1DocumentSource</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_Pages" data-uid="C1.Document.C1PdfDocumentSource.Pages">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.Pages.html#C1_Document_C1PdfDocumentSource_Pages">Pages</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the already generated pages.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_Stream" data-uid="C1.Document.C1PdfDocumentSource.Stream">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.Stream.html#C1_Document_C1PdfDocumentSource_Stream">Stream</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the <a class="xref" href="C1.Document.C1PdfDocumentSource.Stream.html#C1_Document_C1PdfDocumentSource_Stream">Stream</a> object containing PDF content.
Assigning this property new value will reset <a class="xref" href="C1.Document.C1PdfDocumentSource.DocumentLocation.html#C1_Document_C1PdfDocumentSource_DocumentLocation">DocumentLocation</a> to null.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_SupportedExportProviders" data-uid="C1.Document.C1PdfDocumentSource.SupportedExportProviders">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.SupportedExportProviders.html#C1_Document_C1PdfDocumentSource_SupportedExportProviders">SupportedExportProviders</a>
        </td>
        <td class="markdown level1 summary"><p>Overridden. Gets an array of exporters supported by the current document source object.</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="C1_Document_C1PdfDocumentSource_CreateRenderPdfFragment_C1_Document_RenderPdf_" data-uid="C1.Document.C1PdfDocumentSource.CreateRenderPdfFragment(C1.Document.RenderPdf)">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.CreateRenderPdfFragment.html#C1_Document_C1PdfDocumentSource_CreateRenderPdfFragment_C1_Document_RenderPdf_">CreateRenderPdfFragment(RenderPdf)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new instance of the RenderPdfFragment class using the specified RenderPdf object.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_GetContext" data-uid="C1.Document.C1PdfDocumentSource.GetContext">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.GetContext.html#C1_Document_C1PdfDocumentSource_GetContext">GetContext()</a>
        </td>
        <td class="markdown level1 summary"><p>For internal use.
Returns a  <a class="xref" href="C1.Document.C1DocumentSourceContext.html">C1DocumentSourceContext</a> object representing the current context
of the <a class="xref" href="C1.Document.C1DocumentSource.html">C1DocumentSource</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_GetDocumentRange_C1_Document_C1DocumentTextPosition_C1_Document_C1DocumentTextPosition_C1_Document_Util_IC1TextMeasurementContext_" data-uid="C1.Document.C1PdfDocumentSource.GetDocumentRange(C1.Document.C1DocumentTextPosition,C1.Document.C1DocumentTextPosition,C1.Document.Util.IC1TextMeasurementContext)">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.GetDocumentRange.html#C1_Document_C1PdfDocumentSource_GetDocumentRange_C1_Document_C1DocumentTextPosition_C1_Document_C1DocumentTextPosition_C1_Document_Util_IC1TextMeasurementContext_">GetDocumentRange(C1DocumentTextPosition, C1DocumentTextPosition, IC1TextMeasurementContext)</a>
        </td>
        <td 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>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_GetPageDocumentRange_C1_Document_C1Page_C1_Document_Util_IC1TextMeasurementContext_" data-uid="C1.Document.C1PdfDocumentSource.GetPageDocumentRange(C1.Document.C1Page,C1.Document.Util.IC1TextMeasurementContext)">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.GetPageDocumentRange.html#C1_Document_C1PdfDocumentSource_GetPageDocumentRange_C1_Document_C1Page_C1_Document_Util_IC1TextMeasurementContext_">GetPageDocumentRange(C1Page, IC1TextMeasurementContext)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a <span class="xref">C1.Document.C1DocumentRange</span> object that includes the specified page.
This method can return null if the page contains no text.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_GetWholeDocumentRange_C1_Document_Util_IC1TextMeasurementContext_" data-uid="C1.Document.C1PdfDocumentSource.GetWholeDocumentRange(C1.Document.Util.IC1TextMeasurementContext)">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.GetWholeDocumentRange.html#C1_Document_C1PdfDocumentSource_GetWholeDocumentRange_C1_Document_Util_IC1TextMeasurementContext_">GetWholeDocumentRange(IC1TextMeasurementContext)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a <span class="xref">C1.Document.C1DocumentRange</span> object that includes the whole document.
This method can return null if the document contains no text.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_Init" data-uid="C1.Document.C1PdfDocumentSource.Init">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.Init.html#C1_Document_C1PdfDocumentSource_Init">Init()</a>
        </td>
        <td class="markdown level1 summary"><p>For internal use.
It is called from the constructor.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_LoadFromFile_System_String_" data-uid="C1.Document.C1PdfDocumentSource.LoadFromFile(System.String)">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.LoadFromFile.html#C1_Document_C1PdfDocumentSource_LoadFromFile_System_String_">LoadFromFile(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Loads document from file.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_LoadFromStream_System_IO_Stream_" data-uid="C1.Document.C1PdfDocumentSource.LoadFromStream(System.IO.Stream)">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.LoadFromStream.html#C1_Document_C1PdfDocumentSource_LoadFromStream_System_IO_Stream_">LoadFromStream(Stream)</a>
        </td>
        <td class="markdown level1 summary"><p>Loads document from Stream.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_ResetDocumentLocation" data-uid="C1.Document.C1PdfDocumentSource.ResetDocumentLocation">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.ResetDocumentLocation.html#C1_Document_C1PdfDocumentSource_ResetDocumentLocation">ResetDocumentLocation()</a>
        </td>
        <td class="markdown level1 summary"><p>Resets value of the <a class="xref" href="C1.Document.C1PdfDocumentSource.DocumentLocation.html#C1_Document_C1PdfDocumentSource_DocumentLocation">DocumentLocation</a> property to default value.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_SetContext_C1_Document_C1DocumentSourceContext_" data-uid="C1.Document.C1PdfDocumentSource.SetContext(C1.Document.C1DocumentSourceContext)">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.SetContext.html#C1_Document_C1PdfDocumentSource_SetContext_C1_Document_C1DocumentSourceContext_">SetContext(C1DocumentSourceContext)</a>
        </td>
        <td class="markdown level1 summary"><p>For internal use.
Sets the context for the current <a class="xref" href="C1.Document.C1DocumentSource.html">C1DocumentSource</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Document_C1PdfDocumentSource_ShouldSerializeDocumentLocation" data-uid="C1.Document.C1PdfDocumentSource.ShouldSerializeDocumentLocation">
          <a class="xref" href="C1.Document.C1PdfDocumentSource.ShouldSerializeDocumentLocation.html#C1_Document_C1PdfDocumentSource_ShouldSerializeDocumentLocation">ShouldSerializeDocumentLocation()</a>
        </td>
        <td class="markdown level1 summary"><p>Indicates whether the <a class="xref" href="C1.Document.C1PdfDocumentSource.DocumentLocation.html#C1_Document_C1PdfDocumentSource_DocumentLocation">DocumentLocation</a> property should be persisted.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
