# C1.Win.Document.Util.C1RichText.GetRtfMetafileBytes

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Document_Util_C1RichText_GetRtfMetafileBytes_" data-uid="C1.Win.Document.Util.C1RichText.GetRtfMetafileBytes*">GetRtfMetafileBytes Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Document_Util_C1RichText_GetRtfMetafileBytes_" data-uid="C1.Win.Document.Util.C1RichText.GetRtfMetafileBytes*"></a>
<h4 id="C1_Win_Document_Util_C1RichText_GetRtfMetafileBytes_System_Drawing_Graphics_System_String_System_Int32_System_Int32_C1_Interop_Rect_System_Boolean_" data-uid="C1.Win.Document.Util.C1RichText.GetRtfMetafileBytes(System.Drawing.Graphics,System.String,System.Int32,System.Int32,C1.Interop.Rect,System.Boolean)">GetRtfMetafileBytes(Graphics, string, int, int, Rect, bool)</h4>
<div class="markdown level1 summary"><p>Draws specified RTF text into metafile and returns metafile's data,
<code class="paramref">bounds</code> should be specified in twips.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static byte[] GetRtfMetafileBytes(Graphics measurmentGraphics, string rtf, int firstCharIndex, int length, Rect bounds, bool detectUrls)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetRtfMetafileBytes(measurmentGraphics As Graphics, rtf As String, firstCharIndex As Integer, length As Integer, bounds As Rect, detectUrls As Boolean) As Byte()</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">Graphics</span></td>
      <td><span class="parametername">measurmentGraphics</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">rtf</span></td>
      <td><p>The RTF 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">firstCharIndex</span></td>
      <td><p>The index of first character.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">length</span></td>
      <td><p>The total number of characters.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Rect</span></td>
      <td><span class="parametername">bounds</span></td>
      <td><p>The rectangle bounds.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">detectUrls</span></td>
      <td><p>A value indicating whether or not the C1RichText will automatically format a Uniform Resource Locator (URL).</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.byte">byte</a>[]</td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
