This documentation is archived and is not being maintained.

XpsDocument Class

Provides a Package that holds the content of an XPS document.

Namespace:  System.Windows.Xps.Packaging
Assembly:  ReachFramework (in ReachFramework.dll)

public class XpsDocument : XpsPartBase, 
You cannot directly create an instance of this class in XAML.

An XpsDocument contains a FixedDocumentSequence that comprises one or more FixedDocument elements.

The XpsDocument constructor is passed a reference to a Package for writing, storing, and reading the content elements of the document.

A new empty XPS Package is created by using the Package constructor.

An existing XPS Package is opened by using the Package.Open method.

A FixedDocumentSequence root is added to an empty XPS Package by calling the AddFixedDocumentSequence method.

PrintTicket elements with printer information and control can also be associated with the FixedDocumentSequence, or on individual FixedDocument and FixedPage elements that are stored in the XpsDocument.

For more information about XPS see the XML Paper Specification (XPS) available for download at

For a list of XPS related example programs, see the following topics:


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0