IXpsOMPackageWriter interface (xpsobjectmodel.h)

Incrementally writes the parts of an XPS document to a package file.


The IXpsOMPackageWriter interface inherits from the IUnknown interface. IXpsOMPackageWriter also has these types of members:


The IXpsOMPackageWriter interface has these methods.

Method Description
IXpsOMPackageWriter::AddPage Writes a new FixedPage part to the currently open FixedDocument part in the package.
IXpsOMPackageWriter::AddResource Creates a new part resource in the package.
IXpsOMPackageWriter::Close Closes any open parts of the package, then closes the package.
IXpsOMPackageWriter::IsClosed Gets the status of the IXpsOMPackageWriter interface.
IXpsOMPackageWriter::StartNewDocument Opens and initializes a new FixedDocument in the FixedDocumentSequence of the package.


Progressive writing enables an application to serialize XPS document content and resources as they become available. It does not require the application to create all elements of the document before serialization.

This interface writes the pages to the package sequentially, in the order that AddPage is called. The interface does not support page writing in a non-sequential order; thus it should only be used when page content is produced or is available for writing in the order it is to appear in the XPS document.


Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header xpsobjectmodel.h

See also




Print an XPS OM

Using the IXpsOMPackageWriter Interface

XML Paper Specification