# C1.WPF.Document.C1PageSettings.ToPageSettings

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Document_C1PageSettings_ToPageSettings_" data-uid="C1.WPF.Document.C1PageSettings.ToPageSettings*">ToPageSettings Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Document_C1PageSettings_ToPageSettings_" data-uid="C1.WPF.Document.C1PageSettings.ToPageSettings*"></a>
<h4 id="C1_WPF_Document_C1PageSettings_ToPageSettings_C1_Document_C1PageSettings_" data-uid="C1.WPF.Document.C1PageSettings.ToPageSettings(C1.Document.C1PageSettings)">ToPageSettings(C1PageSettings)</h4>
<div class="markdown level1 summary"><p>Converts the specified C1PageSettings to a PageSettings object, adjusting margins and paper size to match
the original settings.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static PageSettings ToPageSettings(C1PageSettings pageSettings)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function ToPageSettings(pageSettings As C1PageSettings) As PageSettings</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">C1PageSettings</span></td>
      <td><span class="parametername">pageSettings</span></td>
      <td><p>The C1PageSettings object containing the page layout, margin, and orientation information to be converted.</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.drawing.printing.pagesettings">PageSettings</a></td>
      <td><p>A PageSettings object that reflects the converted settings, including margins and paper size.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Document_C1PageSettings_ToPageSettings_" data-uid="C1.WPF.Document.C1PageSettings.ToPageSettings*"></a>
<h4 id="C1_WPF_Document_C1PageSettings_ToPageSettings_System_Drawing_Printing_PrinterSettings_" data-uid="C1.WPF.Document.C1PageSettings.ToPageSettings(System.Drawing.Printing.PrinterSettings)">ToPageSettings(PrinterSettings)</h4>
<div class="markdown level1 summary"><p>Creates an instance of the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.printing.pagesettings">PageSettings</a> class,
and initializes it with the properties of the current <a class="xref" href="C1.WPF.Document.C1PageSettings.html">C1PageSettings</a> object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public PageSettings ToPageSettings(PrinterSettings printerSettings)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ToPageSettings(printerSettings As PrinterSettings) As PageSettings</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.drawing.printing.printersettings">PrinterSettings</a></td>
      <td><span class="parametername">printerSettings</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.printing.printersettings">PrinterSettings</a> object
used to create the resulting <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.printing.pagesettings">PageSettings</a>.
If null, the default printer is used.</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.drawing.printing.pagesettings">PageSettings</a></td>
      <td><p>The newly created <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.printing.pagesettings">PageSettings</a> object.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
