# C1.C1Preview.Export.Xps.XpsC1Doc

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_C1Preview_Export_Xps_XpsC1Doc" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc" class="text-break">XpsC1Doc Class
</h1>
  <div class="markdown level0 summary"><p>Provides XPS representation of a C1PrintDocument.
The generated XPS can be stored either in a disk file or in memory,
depending on the constructor used to create the instance of this type.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">XpsC1Doc</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.C1Preview.Export.Xps.html">C1.C1Preview.Export.Xps</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.PrintDocument.4.6.2.dll</h6>
  <h5 id="C1_C1Preview_Export_Xps_XpsC1Doc_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class XpsC1Doc : IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class XpsC1Doc
    Implements IDisposable</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc__ctor_C1_C1Preview_C1PrintDocument_" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.#ctor(C1.C1Preview.C1PrintDocument)">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.-ctor.html#C1_C1Preview_Export_Xps_XpsC1Doc__ctor_C1_C1Preview_C1PrintDocument_">XpsC1Doc(C1PrintDocument)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates an instance of XpsC1Doc that holds the XPS document in memory.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc__ctor_C1_C1Preview_C1PrintDocument_System_String_" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.#ctor(C1.C1Preview.C1PrintDocument,System.String)">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.-ctor.html#C1_C1Preview_Export_Xps_XpsC1Doc__ctor_C1_C1Preview_C1PrintDocument_System_String_">XpsC1Doc(C1PrintDocument, string)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates an instance of XpsC1Doc that creates the XPS document in a disk file.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc_Document" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.Document">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.Document.html#C1_C1Preview_Export_Xps_XpsC1Doc_Document">Document</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the source <a class="xref" href="C1.C1Preview.C1PrintDocument.html">C1PrintDocument</a>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc_LongOperationEventHandler" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.LongOperationEventHandler">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.LongOperationEventHandler.html#C1_C1Preview_Export_Xps_XpsC1Doc_LongOperationEventHandler">LongOperationEventHandler</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the delegate that will be called periodically while the document generates.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc_LongOperationEventSender" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.LongOperationEventSender">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.LongOperationEventSender.html#C1_C1Preview_Export_Xps_XpsC1Doc_LongOperationEventSender">LongOperationEventSender</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the sender argument for the long operation event.
If not set, the current object is used.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc_XpsDocument" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.XpsDocument">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.XpsDocument.html#C1_C1Preview_Export_Xps_XpsC1Doc_XpsDocument">XpsDocument</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.XpsDocument.html#C1_C1Preview_Export_Xps_XpsC1Doc_XpsDocument">XpsDocument</a> representing the source document.
Note that the document is committed when this property is first accessed,
and cannot be changed afterwards.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc_XpsDpi" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.XpsDpi">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.XpsDpi.html#C1_C1Preview_Export_Xps_XpsC1Doc_XpsDpi">XpsDpi</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the resolution used for pages' content. In the current version,
this is determined by the CreationDpi of the source C1PrintDocument.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc_Commit" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.Commit">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.Commit.html#C1_C1Preview_Export_Xps_XpsC1Doc_Commit">Commit()</a>
        </td>
        <td class="markdown level1 summary"><p>Commits the document.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc_Dispose" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.Dispose">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.Dispose.html#C1_C1Preview_Export_Xps_XpsC1Doc_Dispose">Dispose()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc_Dispose_System_Boolean_" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.Dispose(System.Boolean)">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.Dispose.html#C1_C1Preview_Export_Xps_XpsC1Doc_Dispose_System_Boolean_">Dispose(bool)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc_RuToXpsPixel_System_Double_" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.RuToXpsPixel(System.Double)">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.RuToXpsPixel.html#C1_C1Preview_Export_Xps_XpsC1Doc_RuToXpsPixel_System_Double_">RuToXpsPixel(double)</a>
        </td>
        <td class="markdown level1 summary"><p>Converts an absolute value in document's ResolvedUnitType units to a value in XPS pixels.</p>
</td>
      </tr>
      <tr>
        <td id="C1_C1Preview_Export_Xps_XpsC1Doc_UnitToXpsPixel_C1_C1Preview_Unit_" data-uid="C1.C1Preview.Export.Xps.XpsC1Doc.UnitToXpsPixel(C1.C1Preview.Unit)">
          <a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.UnitToXpsPixel.html#C1_C1Preview_Export_Xps_XpsC1Doc_UnitToXpsPixel_C1_C1Preview_Unit_">UnitToXpsPixel(Unit)</a>
        </td>
        <td class="markdown level1 summary"><p>Converts a <a class="xref" href="C1.C1Preview.Unit.html">Unit</a> value to XPS pixels using the page resolution (<a class="xref" href="C1.C1Preview.Export.Xps.XpsC1Doc.XpsDpi.html#C1_C1Preview_Export_Xps_XpsC1Doc_XpsDpi">XpsDpi</a>).</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
