This documentation is archived and is not being maintained.
XpsDocument Constructor
Visual Studio 2010
Initializes a new instance of the XpsDocument class.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
| Name | Description | |
|---|---|---|
|
XpsDocument(Package) | Initializes a new instance of the XpsDocument class with access to a specified XML Paper Specification (XPS) Package and default interleaving, resource, and compression options. |
|
XpsDocument(Package, CompressionOption) | Initializes a new instance of the XpsDocument class that is contained in a specified Package with specified default interleaving, resource, and compression options. |
|
XpsDocument(String, FileAccess) | Initializes a new instance of the XpsDocument class that is contained in a specified Package file with default interleaving, resource, and compression options. |
|
XpsDocument(Package, CompressionOption, String) | Initializes a new instance of the XpsDocument class that is contained in a specified Package with the specified default interleaving, resource, and compression options. |
|
XpsDocument(String, FileAccess, CompressionOption) | Initializes a new instance of the XpsDocument class that is contained in a specified Package file with default interleaving, resource, and compression options. |
The following example shows how to create and close an XpsDocument.
// Create an XpsDocument package (without PrintTicket). { Package^ package = Package::Open(packageName); try { XpsDocument^ xpsDocument = gcnew XpsDocument(package); // Add the package content (false=without PrintTicket). AddPackageContent(xpsDocument, false); // Close the package. xpsDocument->Close(); } finally { delete package; }
The following example also shows how to create and close an XpsDocument.
// Save as a WordXML document. WordXmlSerializer.SaveToFile(fileName, flowDocument.ContentStart, flowDocument.ContentEnd); return true;
Show: