共用方式為


IXpsOMDocument interface

An ordered sequence of fixed pages and document-level resources that make up the document.

When to implement

Never. Custom implementation of this interface is not supported.

Members

The IXpsOMDocument interface inherits from IXpsOMPart. IXpsOMDocument also has these types of members:

  • Methods

Methods

The IXpsOMDocument interface has these methods.

Method Description
Clone

Makes a deep copy of the interface.

GetDocumentStructureResource

Gets a pointer to the IXpsOMDocumentStructureResource interface of the resource that contains structural information about the document.

GetOwner

Gets a pointer to the IXpsOMDocumentSequence interface that contains the document.

GetPageReferences

Gets the IXpsOMPageReferenceCollection interface of the document, which allows virtualized access to its pages.

GetPrintTicketResource

Gets the IXpsOMPrintTicketResource interface of the document-level print ticket.

GetSignatureBlockResources

Gets a pointer to the IXpsOMSignatureBlockResourceCollection interface, which refers to a collection of the document's digital signature block resources.

SetDocumentStructureResource

Sets the IXpsOMDocumentStructureResource interface for the document.

SetPrintTicketResource

Sets the IXpsOMPrintTicketResource interface for the document-level print ticket.

 

Remarks

The code example that follows illustrates how to create an instance of this interface.

IXpsOMDocument    *newInterface;
IOpcPartUri       *partUri;

// Note the implicit requirement that CoInitializeEx 
//  has previously been called from this thread.

hr = CoCreateInstance(
    __uuidof(XpsOMObjectFactory),
    NULL,
    CLSCTX_INPROC_SERVER,
    _uuidof(IXpsOMObjectFactory),
    reinterpret_cast<LPVOID*>(&xpsFactory)
    );

if (SUCCEEDED(hr))
{
    hr = xpsFactory->CreatePartUri(partUriString, &partUri);
    
    if (SUCCEEDED(hr))
    {
        hr = xpsFactory->CreateDocument (partUri, &newInterface);
        
        if (SUCCEEDED(hr))
        {
            // use newInterface

            newInterface->Release();
        }
        partUri->Release();
    }
    xpsFactory->Release();
}
else
{
    // evaluate HRESULT error returned in hr
}

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Header

Xpsobjectmodel.h

IDL

XpsObjectModel.idl

See also

IXpsOMPart

IXpsOMObjectFactory::CreateDocument

Interfaces

XML Paper Specification