# C1.Pdf.C1PdfDocument.DrawImage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Pdf_C1PdfDocument_DrawImage_" data-uid="C1.Pdf.C1PdfDocument.DrawImage*">DrawImage Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Pdf_C1PdfDocument_DrawImage_" data-uid="C1.Pdf.C1PdfDocument.DrawImage*"></a>
<h4 id="C1_Pdf_C1PdfDocument_DrawImage_GrapeCity_Documents_Drawing_Image_System_Drawing_RectangleF_C1_Util_ContentAlignment_C1_Util_ImageSizeMode_" data-uid="C1.Pdf.C1PdfDocument.DrawImage(GrapeCity.Documents.Drawing.Image,System.Drawing.RectangleF,C1.Util.ContentAlignment,C1.Util.ImageSizeMode)">DrawImage(Image, RectangleF, ContentAlignment, ImageSizeMode)</h4>
<div class="markdown level1 summary"><p>Draws the specified <span class="xref">GrapeCity.Documents.Drawing.Image</span> object at the specified location,
adjusting the image size as specified by the <code class="paramref">align</code> and
<code class="paramref">mode</code> parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawImage(Image img, RectangleF rc, ContentAlignment align, ImageSizeMode mode)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawImage(img As Image, rc As RectangleF, align As ContentAlignment, mode As ImageSizeMode)</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">Image</span></td>
      <td><span class="parametername">img</span></td>
      <td><p><span class="xref">GrapeCity.Documents.Drawing.Image</span> object to draw.</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 image, in points from the top left corner of the page.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.ContentAlignment.html">ContentAlignment</a></td>
      <td><span class="parametername">align</span></td>
      <td><p><a class="xref" href="C1.Util.ContentAlignment.html">ContentAlignment</a> value that specifies how the image should be aligned within the rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.ImageSizeMode.html">ImageSizeMode</a></td>
      <td><span class="parametername">mode</span></td>
      <td><p><a class="xref" href="C1.Util.ImageSizeMode.html">ImageSizeMode</a> value that specifies how the image should be sized to fit the rectangle.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="C1.Util.IFlowDocument.DrawImage.html#C1_Util_IFlowDocument_DrawImage_GrapeCity_Documents_Drawing_Image_System_Drawing_RectangleF_C1_Util_ContentAlignment_C1_Util_ImageSizeMode_">IFlowDocument.DrawImage(Image, RectangleF, ContentAlignment, ImageSizeMode)</a></div>


<a id="C1_Pdf_C1PdfDocument_DrawImage_" data-uid="C1.Pdf.C1PdfDocument.DrawImage*"></a>
<h4 id="C1_Pdf_C1PdfDocument_DrawImage_GrapeCity_Documents_Drawing_Image_System_Drawing_RectangleF_" data-uid="C1.Pdf.C1PdfDocument.DrawImage(GrapeCity.Documents.Drawing.Image,System.Drawing.RectangleF)">DrawImage(Image, RectangleF)</h4>
<div class="markdown level1 summary"><p>Draws the specified <span class="xref">GrapeCity.Documents.Drawing.Image</span> object at the specified location,
stretching it to fit the destination rectangle.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawImage(Image img, RectangleF rc)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawImage(img As Image, rc As RectangleF)</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">Image</span></td>
      <td><span class="parametername">img</span></td>
      <td><p><span class="xref">GrapeCity.Documents.Drawing.Image</span> object to draw.</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 image, in points from the top left corner of the page.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="C1.Util.IFlowDocument.DrawImage.html#C1_Util_IFlowDocument_DrawImage_GrapeCity_Documents_Drawing_Image_System_Drawing_RectangleF_">IFlowDocument.DrawImage(Image, RectangleF)</a></div>
<h5 id="C1_Pdf_C1PdfDocument_DrawImage_GrapeCity_Documents_Drawing_Image_System_Drawing_RectangleF__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The <b>DrawImage</b> method can be used to render bitmaps and metafiles. When used with
metafiles, it enumerates the drawing commands in the metafile and translates them into low-level
drawing primitives. This results in resolution-independent images.</p>
</div>


<a id="C1_Pdf_C1PdfDocument_DrawImage_" data-uid="C1.Pdf.C1PdfDocument.DrawImage*"></a>
<h4 id="C1_Pdf_C1PdfDocument_DrawImage_GrapeCity_Documents_Drawing_Image_System_Drawing_RectangleF_System_Drawing_RectangleF_" data-uid="C1.Pdf.C1PdfDocument.DrawImage(GrapeCity.Documents.Drawing.Image,System.Drawing.RectangleF,System.Drawing.RectangleF)">DrawImage(Image, RectangleF, RectangleF)</h4>
<div class="markdown level1 summary"><p>Draws the specified <span class="xref">GrapeCity.Documents.Drawing.Image</span> object at the specified location,
clipping the output to the given clipping rectangle.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawImage(Image img, RectangleF rcImage, RectangleF rcClip)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawImage(img As Image, rcImage As RectangleF, rcClip As RectangleF)</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">Image</span></td>
      <td><span class="parametername">img</span></td>
      <td><p><span class="xref">GrapeCity.Documents.Drawing.Image</span> object to draw.</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">rcImage</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 image, 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.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">rcClip</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a> structure that specifies a clipping rectangle on the page. No part of the image is drawn outside the clipping rectangle.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="implements">Implements</h5>
    <div><a class="xref" href="C1.Util.IFlowDocument.DrawImage.html#C1_Util_IFlowDocument_DrawImage_GrapeCity_Documents_Drawing_Image_System_Drawing_RectangleF_System_Drawing_RectangleF_">IFlowDocument.DrawImage(Image, RectangleF, RectangleF)</a></div>
</div>
