XpsDocument Constructor

XpsDocument Constructor

 

Initializes a new instance of the XpsDocument class.

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

NameDescription
System_CAPS_pubmethodXpsDocument(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.

System_CAPS_pubmethodXpsDocument(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.

System_CAPS_pubmethodXpsDocument(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.

System_CAPS_pubmethodXpsDocument(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.

System_CAPS_pubmethodXpsDocument(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).
using (Package package = Package.Open(packageName))
{
    XpsDocument xpsDocument = new XpsDocument(package);

    // Add the package content (false=without PrintTicket).
    AddPackageContent(xpsDocument, false);

    // Close the package.
    xpsDocument.Close();
}

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;
Return to top
Show:
© 2016 Microsoft