# C1.Pdf.PdfTextBlock.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Pdf_PdfTextBlock__ctor_" data-uid="C1.Pdf.PdfTextBlock.#ctor*">PdfTextBlock Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Pdf_PdfTextBlock__ctor_" data-uid="C1.Pdf.PdfTextBlock.#ctor*"></a>
<h4 id="C1_Pdf_PdfTextBlock__ctor_System_String_C1_Util_Font_System_Int32_" data-uid="C1.Pdf.PdfTextBlock.#ctor(System.String,C1.Util.Font,System.Int32)">PdfTextBlock(string, Font, int)</h4>
<div class="markdown level1 summary"><p>Initialization text block.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public PdfTextBlock(string text, Font font, int fontIndex)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(text As String, font As Font, fontIndex 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 of this block.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.Font.html">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>The current font of this block.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">fontIndex</span></td>
      <td><p>The alternative or current font index.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Pdf_PdfTextBlock__ctor_" data-uid="C1.Pdf.PdfTextBlock.#ctor*"></a>
<h4 id="C1_Pdf_PdfTextBlock__ctor_System_String_C1_Util_Font_System_Int32___System_Int32___System_Int32_" data-uid="C1.Pdf.PdfTextBlock.#ctor(System.String,C1.Util.Font,System.Int32[],System.Int32[],System.Int32)">PdfTextBlock(string, Font, int[], int[], int)</h4>
<div class="markdown level1 summary"><p>Initialization text block.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public PdfTextBlock(string text, Font font, int[] widths, int[] kerns, int fontIndex)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(text As String, font As Font, widths As Integer(), kerns As Integer(), fontIndex 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 of this block.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.Font.html">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>The current font of this block.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>[]</td>
      <td><span class="parametername">widths</span></td>
      <td><p>The widths of each character(symbol) of the text.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>[]</td>
      <td><span class="parametername">kerns</span></td>
      <td><p>The width between symbols in the text (count = text length - 1).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">fontIndex</span></td>
      <td><p>The alternative or current font index.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
