# C1.C1Word.C1WordDocument.DrawString

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Word_C1WordDocument_DrawString_" data-uid="C1.C1Word.C1WordDocument.DrawString*">DrawString Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Word_C1WordDocument_DrawString_" data-uid="C1.C1Word.C1WordDocument.DrawString*"></a>
<h4 id="C1_C1Word_C1WordDocument_DrawString_System_String_System_Drawing_RectangleF_" data-uid="C1.C1Word.C1WordDocument.DrawString(System.String,System.Drawing.RectangleF)">DrawString(string, RectangleF)</h4>
<div class="markdown level1 summary"><p>Draw text string into this document in next position.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawString(string text, RectangleF rc)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawString(text As String, 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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>The text string of the paragraph.</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>The drawing rectangle.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Word_C1WordDocument_DrawString_" data-uid="C1.C1Word.C1WordDocument.DrawString*"></a>
<h4 id="C1_C1Word_C1WordDocument_DrawString_System_String_System_Drawing_Font_System_Drawing_Color_System_Drawing_RectangleF_" data-uid="C1.C1Word.C1WordDocument.DrawString(System.String,System.Drawing.Font,System.Drawing.Color,System.Drawing.RectangleF)">DrawString(string, Font, Color, RectangleF)</h4>
<div class="markdown level1 summary"><p>Draw text string into this document in next position.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int DrawString(string text, Font font, Color clr, RectangleF rc)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function DrawString(text As String, font As Font, clr As Color, rc As RectangleF) As Integer</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">text</span></td>
      <td><p>The text string of the paragraph.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>The drawing font.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">clr</span></td>
      <td><p>The drawing color.</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>The drawing rectangle.</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The index of first character that was not printed because it did not fit in the specified rectangle.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Word_C1WordDocument_DrawString_" data-uid="C1.C1Word.C1WordDocument.DrawString*"></a>
<h4 id="C1_C1Word_C1WordDocument_DrawString_System_String_System_Drawing_Font_System_Drawing_Color_System_Drawing_RectangleF_System_Drawing_StringFormat_" data-uid="C1.C1Word.C1WordDocument.DrawString(System.String,System.Drawing.Font,System.Drawing.Color,System.Drawing.RectangleF,System.Drawing.StringFormat)">DrawString(string, Font, Color, RectangleF, StringFormat)</h4>
<div class="markdown level1 summary"><p>Draw text string into this document in next position.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int DrawString(string text, Font font, Color color, RectangleF rc, StringFormat sf)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function DrawString(text As String, font As Font, color As Color, rc As RectangleF, sf As StringFormat) As Integer</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">text</span></td>
      <td><p>The text string of the paragraph.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a> object that defines the appearance and size of the drawn text.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>The object that defines the color of the drawn text.</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>The drawing rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.stringformat">StringFormat</a></td>
      <td><span class="parametername">sf</span></td>
      <td><p>The drawing string format.</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The index of first character that was not printed because it did not fit in the specified rectangle.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Word_C1WordDocument_DrawString_" data-uid="C1.C1Word.C1WordDocument.DrawString*"></a>
<h4 id="C1_C1Word_C1WordDocument_DrawString_System_String_System_Drawing_Font_System_Drawing_Color_System_Drawing_PointF_" data-uid="C1.C1Word.C1WordDocument.DrawString(System.String,System.Drawing.Font,System.Drawing.Color,System.Drawing.PointF)">DrawString(string, Font, Color, PointF)</h4>
<div class="markdown level1 summary"><p>Draws the specified text string at the specified point with the
specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a> and <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a> objects.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int DrawString(string text, Font font, Color color, PointF pt)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function DrawString(text As String, font As Font, color As Color, pt As PointF) As Integer</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">text</span></td>
      <td><p>String to draw.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a> object that defines the appearance and size of the drawn text.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>The object that defines the color of the drawn text.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.pointf">PointF</a></td>
      <td><span class="parametername">pt</span></td>
      <td><p>The point structure that specifies the location of the drawn text, in points from the top left corner of the page.</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>The index of first character that was not printed because it did not fit in the specified rectangle.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
