# C1.C1Preview.C1PrintDocument.GetLengthAbsValue

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_C1PrintDocument_GetLengthAbsValue_" data-uid="C1.C1Preview.C1PrintDocument.GetLengthAbsValue*">GetLengthAbsValue Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_C1PrintDocument_GetLengthAbsValue_" data-uid="C1.C1Preview.C1PrintDocument.GetLengthAbsValue*"></a>
<h4 id="C1_C1Preview_C1PrintDocument_GetLengthAbsValue_C1_C1Preview_LengthAbs_System_Drawing_Font_" data-uid="C1.C1Preview.C1PrintDocument.GetLengthAbsValue(C1.C1Preview.LengthAbs,System.Drawing.Font)">GetLengthAbsValue(LengthAbs, Font)</h4>
<div class="markdown level1 summary"><p>Converts an absolute length represented by a <span class="xref">C1.C1Preview.LengthAbs</span> object
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 GetLengthAbsValue(LengthAbs length, Font font)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetLengthAbsValue(length As LengthAbs, font As Font) 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><span class="xref">LengthAbs</span></td>
      <td><span class="parametername">length</span></td>
      <td><p>The length to convert. If it is expressed in <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Default">Default</a>,
the current document's <a class="xref" href="C1.C1Preview.C1PrintDocument.DefaultUnit.html#C1_C1Preview_C1PrintDocument_DefaultUnit">DefaultUnit</a> units are 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 if <code class="paramref">length</code> is expressed in
<a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Em">Em</a>, <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Ex">Ex</a> or <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_LineSpacing">LineSpacing</a>
(otherwise, it can be <b>null</b>).</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 converted <b>double</b> value.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Preview_C1PrintDocument_GetLengthAbsValue_" data-uid="C1.C1Preview.C1PrintDocument.GetLengthAbsValue*"></a>
<h4 id="C1_C1Preview_C1PrintDocument_GetLengthAbsValue_C1_C1Preview_LengthAbs_C1_C1Preview_Style_C1_C1Preview_Scripting_IScriptContext_" data-uid="C1.C1Preview.C1PrintDocument.GetLengthAbsValue(C1.C1Preview.LengthAbs,C1.C1Preview.Style,C1.C1Preview.Scripting.IScriptContext)">GetLengthAbsValue(LengthAbs, Style, IScriptContext)</h4>
<div class="markdown level1 summary"><p>Converts an absolute length represented by a <span class="xref">C1.C1Preview.LengthAbs</span> object
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 GetLengthAbsValue(LengthAbs length, Style style, IScriptContext context)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetLengthAbsValue(length As LengthAbs, style As Style, context As IScriptContext) 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><span class="xref">LengthAbs</span></td>
      <td><span class="parametername">length</span></td>
      <td><p>The length to convert. If it is expressed in <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Default">Default</a>,
the current document's <a class="xref" href="C1.C1Preview.C1PrintDocument.DefaultUnit.html#C1_C1Preview_C1PrintDocument_DefaultUnit">DefaultUnit</a> units are 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> providing the font, required if <code class="paramref">length</code> is expressed in
<a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Em">Em</a>, <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_Ex">Ex</a> or <a class="xref" href="C1.C1Preview.UnitTypeEnum.html#C1_C1Preview_UnitTypeEnum_LineSpacing">LineSpacing</a>
(otherwise, it can be <b>null</b>).</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">IScriptContext</span></td>
      <td><span class="parametername">context</span></td>
      <td><p><span class="xref">C1.C1Preview.Scripting.IScriptContext</span> that should be used to get calculated properties.</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 converted <b>double</b> value.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
