# C1.C1Preview.C1PrintDocument.RenderDirectText

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_C1PrintDocument_RenderDirectText_" data-uid="C1.C1Preview.C1PrintDocument.RenderDirectText*">RenderDirectText Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_C1PrintDocument_RenderDirectText_" data-uid="C1.C1Preview.C1PrintDocument.RenderDirectText*"></a>
<h4 id="C1_C1Preview_C1PrintDocument_RenderDirectText_C1_C1Preview_Unit_C1_C1Preview_Unit_System_String_System_Object_System_Object_C1_C1Preview_Style_" data-uid="C1.C1Preview.C1PrintDocument.RenderDirectText(C1.C1Preview.Unit,C1.C1Preview.Unit,System.String,System.Object,System.Object,C1.C1Preview.Style)">RenderDirectText(Unit, Unit, string, object, object, Style)</h4>
<div class="markdown level1 summary"><p>Adds a text to the <a class="xref" href="C1.C1Preview.C1PrintDocument.Body.html#C1_C1Preview_C1PrintDocument_Body">Body</a> of the current document
at a specific position on the current page, and resolves it.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void RenderDirectText(Unit x, Unit y, string text, object width, object height, Style style)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub RenderDirectText(x As Unit, y As Unit, text As String, width As Object, height As Object, style As Style)</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="C1.C1Preview.Unit.html">Unit</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The horizontal (X) coordinate at which to render the image (cannot be <b>auto</b>).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.Unit.html">Unit</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The vertical (Y) coordinate at which to render the image (cannot be <b>auto</b>).</p>
</td>
    </tr>
    <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 string to render.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The width of the text area (if <b>null</b>, <b>auto</b> is used).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The height of the text area (if <b>null</b>, <b>auto</b> is used).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.Style.html">Style</a></td>
      <td><span class="parametername">style</span></td>
      <td><p>The <a class="xref" href="C1.C1Preview.C1PrintDocument.Style.html#C1_C1Preview_C1PrintDocument_Style">Style</a> to use, or <b>null</b>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_C1Preview_C1PrintDocument_RenderDirectText_C1_C1Preview_Unit_C1_C1Preview_Unit_System_String_System_Object_System_Object_C1_C1Preview_Style__remarks">Remarks</h5>
<div class="markdown level1 remarks"><pre><code>&lt;p&gt;
</code></pre>
<p>This method can only be used between calls to <a class="xref" href="C1.C1Preview.C1PrintDocument.StartDoc.html#C1_C1Preview_C1PrintDocument_StartDoc">StartDoc()</a> and <a class="xref" href="C1.C1Preview.C1PrintDocument.EndDoc.html#C1_C1Preview_C1PrintDocument_EndDoc">EndDoc()</a>
methods on the current document.
For details, see <a class="xref" href="C1.C1Preview.C1PrintDocument.RenderDirect.html#C1_C1Preview_C1PrintDocument_RenderDirect_C1_C1Preview_Unit_C1_C1Preview_Unit_C1_C1Preview_RenderObject_System_Object_System_Object_">RenderDirect(Unit, Unit, RenderObject, object, object)</a>.</p>

</div>
<h5 id="C1_C1Preview_C1PrintDocument_RenderDirectText_C1_C1Preview_Unit_C1_C1Preview_Unit_System_String_System_Object_System_Object_C1_C1Preview_Style__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="C1.C1Preview.RenderText.html">RenderText</a></div>
    <div><a class="xref" href="C1.C1Preview.C1PrintDocument.RenderDirect.html#C1_C1Preview_C1PrintDocument_RenderDirect_C1_C1Preview_Unit_C1_C1Preview_Unit_C1_C1Preview_RenderObject_System_Object_System_Object_">RenderDirect</a>(<a class="xref" href="C1.C1Preview.Unit.html">Unit</a>, <a class="xref" href="C1.C1Preview.Unit.html">Unit</a>, <a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>)</div>
    <div><a class="xref" href="C1.C1Preview.C1PrintDocument.StartDoc.html#C1_C1Preview_C1PrintDocument_StartDoc">StartDoc</a>()</div>
    <div><a class="xref" href="C1.C1Preview.C1PrintDocument.EndDoc.html#C1_C1Preview_C1PrintDocument_EndDoc">EndDoc</a>()</div>
    <div><a class="xref" href="C1.C1Preview.C1PrintDocument.Generate.html#C1_C1Preview_C1PrintDocument_Generate">Generate</a>()</div>
</div>


<a id="C1_C1Preview_C1PrintDocument_RenderDirectText_" data-uid="C1.C1Preview.C1PrintDocument.RenderDirectText*"></a>
<h4 id="C1_C1Preview_C1PrintDocument_RenderDirectText_C1_C1Preview_Unit_C1_C1Preview_Unit_System_String_System_Object_System_Drawing_Font_System_Windows_Media_Color_C1_C1Preview_AlignHorzEnum_" data-uid="C1.C1Preview.C1PrintDocument.RenderDirectText(C1.C1Preview.Unit,C1.C1Preview.Unit,System.String,System.Object,System.Drawing.Font,System.Windows.Media.Color,C1.C1Preview.AlignHorzEnum)">RenderDirectText(Unit, Unit, string, object, Font, Color, AlignHorzEnum)</h4>
<div class="markdown level1 summary"><p>Adds a text to the <a class="xref" href="C1.C1Preview.C1PrintDocument.Body.html#C1_C1Preview_C1PrintDocument_Body">Body</a> of the current document
at a specific position on the current page, with <b>auto</b> height, and resolves it.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void RenderDirectText(Unit x, Unit y, string text, object width, Font font, Color textColor, AlignHorzEnum horzAlign)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub RenderDirectText(x As Unit, y As Unit, text As String, width As Object, font As Font, textColor As Color, horzAlign As AlignHorzEnum)</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="C1.C1Preview.Unit.html">Unit</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The horizontal (X) coordinate at which to render the image (cannot be <b>auto</b>).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.Unit.html">Unit</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The vertical (Y) coordinate at which to render the image (cannot be <b>auto</b>).</p>
</td>
    </tr>
    <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 string to render.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The width of the text area (if <b>null</b>, <b>auto</b> is used).</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 font to use.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.color">Color</a></td>
      <td><span class="parametername">textColor</span></td>
      <td><p>The text color.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.AlignHorzEnum.html">AlignHorzEnum</a></td>
      <td><span class="parametername">horzAlign</span></td>
      <td><p>The horizontal text alignment.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_C1Preview_C1PrintDocument_RenderDirectText_C1_C1Preview_Unit_C1_C1Preview_Unit_System_String_System_Object_System_Drawing_Font_System_Windows_Media_Color_C1_C1Preview_AlignHorzEnum__remarks">Remarks</h5>
<div class="markdown level1 remarks"><pre><code>&lt;p&gt;
</code></pre>
<p>This method can only be used between calls to <a class="xref" href="C1.C1Preview.C1PrintDocument.StartDoc.html#C1_C1Preview_C1PrintDocument_StartDoc">StartDoc()</a> and <a class="xref" href="C1.C1Preview.C1PrintDocument.EndDoc.html#C1_C1Preview_C1PrintDocument_EndDoc">EndDoc()</a>
methods on the current document.
For details, see <a class="xref" href="C1.C1Preview.C1PrintDocument.RenderDirect.html#C1_C1Preview_C1PrintDocument_RenderDirect_C1_C1Preview_Unit_C1_C1Preview_Unit_C1_C1Preview_RenderObject_System_Object_System_Object_">RenderDirect(Unit, Unit, RenderObject, object, object)</a>.</p>

</div>
<h5 id="C1_C1Preview_C1PrintDocument_RenderDirectText_C1_C1Preview_Unit_C1_C1Preview_Unit_System_String_System_Object_System_Drawing_Font_System_Windows_Media_Color_C1_C1Preview_AlignHorzEnum__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="C1.C1Preview.RenderText.html">RenderText</a></div>
    <div><a class="xref" href="C1.C1Preview.C1PrintDocument.RenderDirect.html#C1_C1Preview_C1PrintDocument_RenderDirect_C1_C1Preview_Unit_C1_C1Preview_Unit_C1_C1Preview_RenderObject_System_Object_System_Object_">RenderDirect</a>(<a class="xref" href="C1.C1Preview.Unit.html">Unit</a>, <a class="xref" href="C1.C1Preview.Unit.html">Unit</a>, <a class="xref" href="C1.C1Preview.RenderObject.html">RenderObject</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>)</div>
    <div><a class="xref" href="C1.C1Preview.C1PrintDocument.StartDoc.html#C1_C1Preview_C1PrintDocument_StartDoc">StartDoc</a>()</div>
    <div><a class="xref" href="C1.C1Preview.C1PrintDocument.EndDoc.html#C1_C1Preview_C1PrintDocument_EndDoc">EndDoc</a>()</div>
    <div><a class="xref" href="C1.C1Preview.C1PrintDocument.Generate.html#C1_C1Preview_C1PrintDocument_Generate">Generate</a>()</div>
</div>
</div>
