# C1.Pdf.C1PdfDocument.DrawFile

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Pdf_C1PdfDocument_DrawFile_" data-uid="C1.Pdf.C1PdfDocument.DrawFile*">DrawFile Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Pdf_C1PdfDocument_DrawFile_" data-uid="C1.Pdf.C1PdfDocument.DrawFile*"></a>
<h4 id="C1_Pdf_C1PdfDocument_DrawFile_System_String_System_Drawing_RectangleF_System_Single_" data-uid="C1.Pdf.C1PdfDocument.DrawFile(System.String,System.Drawing.RectangleF,System.Single)">DrawFile(string, RectangleF, float)</h4>
<div class="markdown level1 summary"><p>Draws a file content to PDF document.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawFile(string fileName, RectangleF rc, float offset = 0)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawFile(fileName As String, rc As RectangleF, Optional offset As Single = 0)</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.string">string</a></td>
      <td><span class="parametername">fileName</span></td>
      <td><p>The full file path.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">rc</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a> structure that specifies the location of the drawn text, in points from the top left corner of the page.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">offset</span></td>
      <td><p>Offset of the first line to draw (usually the return value of a previous call to <b>DrawStringHtml</b>).</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Pdf_C1PdfDocument_DrawFile_" data-uid="C1.Pdf.C1PdfDocument.DrawFile*"></a>
<h4 id="C1_Pdf_C1PdfDocument_DrawFile_System_IO_Stream_System_String_System_Drawing_RectangleF_System_Single_" data-uid="C1.Pdf.C1PdfDocument.DrawFile(System.IO.Stream,System.String,System.Drawing.RectangleF,System.Single)">DrawFile(Stream, string, RectangleF, float)</h4>
<div class="markdown level1 summary"><p>Draws a stream content to PDF document.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawFile(Stream stream, string ext, RectangleF rc, float offset = 0)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawFile(stream As Stream, ext As String, rc As RectangleF, Optional offset As Single = 0)</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.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>The stream with context data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">ext</span></td>
      <td><p>The file extension for content definitions.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">rc</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a> structure that specifies the location of the drawn context, in points from the top left corner of the page.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">offset</span></td>
      <td><p>Offset of the first line to draw (usually the return value of a previous call to <b>DrawStringHtml</b>).</p>
</td>
    </tr>
  </tbody>
</table>
</div>
