XpsDocument XpsDocument XpsDocument XpsDocument Class

Definition

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

public ref class XpsDocument : System::Windows::Xps::Packaging::XpsPartBase, IDisposable
public class XpsDocument : System.Windows.Xps.Packaging.XpsPartBase, IDisposable
type XpsDocument = class
    inherit XpsPartBase
    interface IDisposable
Public Class XpsDocument
Inherits XpsPartBase
Implements IDisposable
Inheritance
XpsDocumentXpsDocumentXpsDocumentXpsDocument
Implements

Remarks

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 http://go.microsoft.com/fwlink/?LinkID=65761.

Constructors

XpsDocument(Package) XpsDocument(Package) XpsDocument(Package) 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) XpsDocument(Package, CompressionOption) XpsDocument(Package, CompressionOption) 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(Package, CompressionOption, String) XpsDocument(Package, CompressionOption, String) XpsDocument(Package, CompressionOption, String) 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) XpsDocument(String, FileAccess) XpsDocument(String, FileAccess) 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(String, FileAccess, CompressionOption) XpsDocument(String, FileAccess, CompressionOption) XpsDocument(String, FileAccess, CompressionOption) 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.

Properties

CoreDocumentProperties CoreDocumentProperties CoreDocumentProperties CoreDocumentProperties

Gets the core PackageProperties of the XPS document.

FixedDocumentSequenceReader FixedDocumentSequenceReader FixedDocumentSequenceReader FixedDocumentSequenceReader

Gets an IXpsFixedDocumentSequenceReader for reading the document.

IsReader IsReader IsReader IsReader

Gets a value that indicates whether the package is readable.

IsSignable IsSignable IsSignable IsSignable

Gets a value that indicates whether the package can be digitally signed.

IsWriter IsWriter IsWriter IsWriter

Gets a value that indicates whether the package is writable.

Signatures Signatures Signatures Signatures

Gets a collection of XML Paper Specification (XPS) signatures that are associated with the package.

Thumbnail Thumbnail Thumbnail Thumbnail

Gets or sets the XML Paper Specification (XPS) thumbnail image that is associated with the document.

Uri Uri Uri Uri

Gets or sets the uniform resource identifier (URI) of the part.

(Inherited from XpsPartBase)

Methods

AddFixedDocumentSequence() AddFixedDocumentSequence() AddFixedDocumentSequence() AddFixedDocumentSequence()

Adds a root FixedDocumentSequence to the package and returns a writer.

AddThumbnail(XpsImageType) AddThumbnail(XpsImageType) AddThumbnail(XpsImageType) AddThumbnail(XpsImageType)

Adds a thumbnail image to the package.

Close() Close() Close() Close()

Closes the XPS document Package.

CreateXpsDocumentWriter(XpsDocument) CreateXpsDocumentWriter(XpsDocument) CreateXpsDocumentWriter(XpsDocument) CreateXpsDocumentWriter(XpsDocument)

Creates an XpsDocumentWriter for writing an XpsDocument.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases the unmanaged resources that are used by the XpsDocument and optionally, releases the managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetFixedDocumentSequence() GetFixedDocumentSequence() GetFixedDocumentSequence() GetFixedDocumentSequence()

Returns the fixed-document sequence at the root of the package.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveSignature(XpsDigitalSignature) RemoveSignature(XpsDigitalSignature) RemoveSignature(XpsDigitalSignature) RemoveSignature(XpsDigitalSignature)

Deletes a signature from the package.

SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions) SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions) SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions) SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions)

Signs a collection of package parts with a specified X.509 certificate.

SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions, Guid) SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions, Guid) SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions, Guid) SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions, Guid)

Signs a collection of package parts by using a specified X.509 certificate.

SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions, Guid, Boolean) SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions, Guid, Boolean) SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions, Guid, Boolean) SignDigitally(X509Certificate, Boolean, XpsDigSigPartAlteringRestrictions, Guid, Boolean)

Signs a collection of package parts with a specified X.509 certificate.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. Use the type-safe Dispose(Boolean) method instead.

Applies to

See Also