# C1.C1Preview.C1PrintDocument.XpsDocument

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_C1PrintDocument_XpsDocument_" data-uid="C1.C1Preview.C1PrintDocument.XpsDocument*">XpsDocument Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_C1PrintDocument_XpsDocument_" data-uid="C1.C1Preview.C1PrintDocument.XpsDocument*"></a>
<h4 id="C1_C1Preview_C1PrintDocument_XpsDocument" data-uid="C1.C1Preview.C1PrintDocument.XpsDocument">XpsDocument</h4>
<div class="markdown level1 summary"><p>Gets the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.xps.packaging.xpsdocument">XpsDocument</a> representing the current document.
Note that retrieving the value of this property generates the document,
hence the application should cache the value if it needs to be accessed more than once.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Obsolete(&quot;Using this property may result in memory leaks. Instead, use GetXpsC1Doc() and dispose of the returned object when you no longer need it.&quot;)]
[Browsable(false)]
public XpsDocument XpsDocument { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;Using this property may result in memory leaks. Instead, use GetXpsC1Doc() and dispose of the returned object when you no longer need it.&quot;)&gt;
&lt;Browsable(False)&gt;
Public ReadOnly Property XpsDocument As XpsDocument</code></pre>
</div>
<h5 id="C1_C1Preview_C1PrintDocument_XpsDocument_seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="C1.C1Preview.C1PrintDocument.GetXpsC1Doc.html#C1_C1Preview_C1PrintDocument_GetXpsC1Doc">GetXpsC1Doc</a>()</div>
    <div><a class="xref" href="C1.C1Preview.C1PrintDocument.FixedDocumentSequence.html#C1_C1Preview_C1PrintDocument_FixedDocumentSequence">FixedDocumentSequence</a></div>
</div>
</div>
