# GrapeCity.Documents.Pdf.Spec.IPdfArrayExt.TryAsRect

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Pdf_Spec_IPdfArrayExt_TryAsRect_" data-uid="GrapeCity.Documents.Pdf.Spec.IPdfArrayExt.TryAsRect*">TryAsRect Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Pdf_Spec_IPdfArrayExt_TryAsRect_" data-uid="GrapeCity.Documents.Pdf.Spec.IPdfArrayExt.TryAsRect*"></a>
<h4 id="GrapeCity_Documents_Pdf_Spec_IPdfArrayExt_TryAsRect_GrapeCity_Documents_Pdf_Spec_IPdfArray_GrapeCity_Documents_Pdf_Spec_IPdfNumber__GrapeCity_Documents_Pdf_Spec_IPdfNumber__GrapeCity_Documents_Pdf_Spec_IPdfNumber__GrapeCity_Documents_Pdf_Spec_IPdfNumber__" data-uid="GrapeCity.Documents.Pdf.Spec.IPdfArrayExt.TryAsRect(GrapeCity.Documents.Pdf.Spec.IPdfArray,GrapeCity.Documents.Pdf.Spec.IPdfNumber@,GrapeCity.Documents.Pdf.Spec.IPdfNumber@,GrapeCity.Documents.Pdf.Spec.IPdfNumber@,GrapeCity.Documents.Pdf.Spec.IPdfNumber@)">TryAsRect(IPdfArray, out IPdfNumber, out IPdfNumber, out IPdfNumber, out IPdfNumber)</h4>
<div class="markdown level1 summary"><p>Tries to convert the array to rectangle,
the array should have 4 elements and all are numbers.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool TryAsRect(this IPdfArray array, out IPdfNumber left, out IPdfNumber bottom, out IPdfNumber right, out IPdfNumber top)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function TryAsRect(array As IPdfArray, ByRef left As IPdfNumber, ByRef bottom As IPdfNumber, ByRef right As IPdfNumber, ByRef top As IPdfNumber) As Boolean</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="GrapeCity.Documents.Pdf.Spec.IPdfArray.html">IPdfArray</a></td>
      <td><span class="parametername">array</span></td>
      <td><p>The current array.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Pdf.Spec.IPdfNumber.html">IPdfNumber</a></td>
      <td><span class="parametername">left</span></td>
      <td><p>OUT: The X of left-bottom corner.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Pdf.Spec.IPdfNumber.html">IPdfNumber</a></td>
      <td><span class="parametername">bottom</span></td>
      <td><p>OUT: The Y of left-bottom corner.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Pdf.Spec.IPdfNumber.html">IPdfNumber</a></td>
      <td><span class="parametername">right</span></td>
      <td><p>OUT: The X of right-top corner.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Pdf.Spec.IPdfNumber.html">IPdfNumber</a></td>
      <td><span class="parametername">top</span></td>
      <td><p>OUT: The Y of right-top corner.</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.boolean">bool</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
