# C1.C1Preview.C1PrintDocument.ToRU

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_C1PrintDocument_ToRU_" data-uid="C1.C1Preview.C1PrintDocument.ToRU*">ToRU Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_C1PrintDocument_ToRU_" data-uid="C1.C1Preview.C1PrintDocument.ToRU*"></a>
<h4 id="C1_C1Preview_C1PrintDocument_ToRU_System_Double_C1_C1Preview_UnitTypeEnum_System_Single_" data-uid="C1.C1Preview.C1PrintDocument.ToRU(System.Double,C1.C1Preview.UnitTypeEnum,System.Single)">ToRU(double, UnitTypeEnum, float)</h4>
<div class="markdown level1 summary"><p>Converts a <b>double</b> value expressed in specified <a class="xref" href="C1.C1Preview.UnitTypeEnum.html">UnitTypeEnum</a> units
to a <b>double</b> value expressed in the current document's <a class="xref" href="C1.C1Preview.C1PrintDocument.ResolvedUnit.html#C1_C1Preview_C1PrintDocument_ResolvedUnit">ResolvedUnit</a> units.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public double ToRU(double value, UnitTypeEnum srcType, float srcDpi)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ToRU(value As Double, srcType As UnitTypeEnum, srcDpi As Single) As Double</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.double">double</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>The source value to convert.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.UnitTypeEnum.html">UnitTypeEnum</a></td>
      <td><span class="parametername">srcType</span></td>
      <td><p>The unit of measurement used to express the source <code class="paramref">value</code>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">srcDpi</span></td>
      <td><p>The source resolution (DPI) (used if <code class="paramref">srcType</code> is <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Pixel">Pixel</a>).</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.double">double</a></td>
      <td><p>The <b>double</b> value expressed in <a class="xref" href="C1.C1Preview.C1PrintDocument.ResolvedUnit.html#C1_C1Preview_C1PrintDocument_ResolvedUnit">ResolvedUnit</a> units.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_C1PrintDocument_ToRU_" data-uid="C1.C1Preview.C1PrintDocument.ToRU*"></a>
<h4 id="C1_C1Preview_C1PrintDocument_ToRU_C1_C1Preview_RectangleD_C1_C1Preview_UnitTypeEnum_System_Single_System_Single_" data-uid="C1.C1Preview.C1PrintDocument.ToRU(C1.C1Preview.RectangleD,C1.C1Preview.UnitTypeEnum,System.Single,System.Single)">ToRU(RectangleD, UnitTypeEnum, float, float)</h4>
<div class="markdown level1 summary"><p>Converts a <a class="xref" href="C1.C1Preview.RectangleD.html">RectangleD</a> structure expressed in specified <a class="xref" href="C1.C1Preview.UnitTypeEnum.html">UnitTypeEnum</a> units
to a <b>RectangleD</b> expressed in the current document's <a class="xref" href="C1.C1Preview.C1PrintDocument.ResolvedUnit.html#C1_C1Preview_C1PrintDocument_ResolvedUnit">ResolvedUnit</a> units.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RectangleD ToRU(RectangleD value, UnitTypeEnum srcType, float srcDpiX, float srcDpiY)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ToRU(value As RectangleD, srcType As UnitTypeEnum, srcDpiX As Single, srcDpiY As Single) As RectangleD</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.RectangleD.html">RectangleD</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>The source value to convert.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.UnitTypeEnum.html">UnitTypeEnum</a></td>
      <td><span class="parametername">srcType</span></td>
      <td><p>The unit of measurement used to express the source <code class="paramref">value</code>.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">srcDpiX</span></td>
      <td><p>The horizontal source resolution (DPI) (used if <code class="paramref">srcType</code> is <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Pixel">Pixel</a>).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">srcDpiY</span></td>
      <td><p>The vertical source resolution (DPI) (used if <code class="paramref">srcType</code> is <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Pixel">Pixel</a>).</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="C1.C1Preview.RectangleD.html">RectangleD</a></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RectangleD.html">RectangleD</a> expressed in <a class="xref" href="C1.C1Preview.C1PrintDocument.ResolvedUnit.html#C1_C1Preview_C1PrintDocument_ResolvedUnit">ResolvedUnit</a> units.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_C1PrintDocument_ToRU_" data-uid="C1.C1Preview.C1PrintDocument.ToRU*"></a>
<h4 id="C1_C1Preview_C1PrintDocument_ToRU_System_Double_C1_C1Preview_UnitTypeEnum_" data-uid="C1.C1Preview.C1PrintDocument.ToRU(System.Double,C1.C1Preview.UnitTypeEnum)">ToRU(double, UnitTypeEnum)</h4>
<div class="markdown level1 summary"><p>Converts a <b>double</b> value expressed in specified <a class="xref" href="C1.C1Preview.UnitTypeEnum.html">UnitTypeEnum</a> units
to a <b>double</b> value expressed in the current document's <a class="xref" href="C1.C1Preview.C1PrintDocument.ResolvedUnit.html#C1_C1Preview_C1PrintDocument_ResolvedUnit">ResolvedUnit</a> units,
using <a class="xref" href="C1.C1Preview.C1PrintDocument.CreationDpi.html#C1_C1Preview_C1PrintDocument_CreationDpi">CreationDpi</a> as the source resolution if <code class="paramref">srcType</code> is <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Pixel">Pixel</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public double ToRU(double value, UnitTypeEnum srcType)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ToRU(value As Double, srcType As UnitTypeEnum) As Double</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.double">double</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>The source value to convert.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.UnitTypeEnum.html">UnitTypeEnum</a></td>
      <td><span class="parametername">srcType</span></td>
      <td><p>The unit of measurement used to express the source <code class="paramref">value</code>.
If equal to <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Pixel">Pixel</a>, the current document's <a class="xref" href="C1.C1Preview.C1PrintDocument.CreationDpi.html#C1_C1Preview_C1PrintDocument_CreationDpi">CreationDpi</a> is used as the source resolution (DPI).</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.double">double</a></td>
      <td><p>The <b>double</b> value expressed in <a class="xref" href="C1.C1Preview.C1PrintDocument.ResolvedUnit.html#C1_C1Preview_C1PrintDocument_ResolvedUnit">ResolvedUnit</a> units.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_C1PrintDocument_ToRU_" data-uid="C1.C1Preview.C1PrintDocument.ToRU*"></a>
<h4 id="C1_C1Preview_C1PrintDocument_ToRU_C1_C1Preview_RectangleD_C1_C1Preview_UnitTypeEnum_" data-uid="C1.C1Preview.C1PrintDocument.ToRU(C1.C1Preview.RectangleD,C1.C1Preview.UnitTypeEnum)">ToRU(RectangleD, UnitTypeEnum)</h4>
<div class="markdown level1 summary"><p>Converts a <a class="xref" href="C1.C1Preview.RectangleD.html">RectangleD</a> structure expressed in specified <a class="xref" href="C1.C1Preview.UnitTypeEnum.html">UnitTypeEnum</a> units
to a <b>RectangleD</b> expressed in the current document's <a class="xref" href="C1.C1Preview.C1PrintDocument.ResolvedUnit.html#C1_C1Preview_C1PrintDocument_ResolvedUnit">ResolvedUnit</a> units,
using <a class="xref" href="C1.C1Preview.C1PrintDocument.CreationDpi.html#C1_C1Preview_C1PrintDocument_CreationDpi">CreationDpi</a> as the source resolution if <code class="paramref">srcType</code> is <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Pixel">Pixel</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RectangleD ToRU(RectangleD value, UnitTypeEnum srcType)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ToRU(value As RectangleD, srcType As UnitTypeEnum) As RectangleD</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.RectangleD.html">RectangleD</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>The source value to convert.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.C1Preview.UnitTypeEnum.html">UnitTypeEnum</a></td>
      <td><span class="parametername">srcType</span></td>
      <td><p>The unit of measurement used to express the source <code class="paramref">value</code>.
If equal to <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Pixel">Pixel</a>, the current document's <a class="xref" href="C1.C1Preview.C1PrintDocument.CreationDpi.html#C1_C1Preview_C1PrintDocument_CreationDpi">CreationDpi</a> is used as the source resolution (DPI).</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="C1.C1Preview.RectangleD.html">RectangleD</a></td>
      <td><p>The <a class="xref" href="C1.C1Preview.RectangleD.html">RectangleD</a> expressed in <a class="xref" href="C1.C1Preview.C1PrintDocument.ResolvedUnit.html#C1_C1Preview_C1PrintDocument_ResolvedUnit">ResolvedUnit</a> units.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
