IXpsOMDocument interface (xpsobjectmodel.h)

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

Inheritance

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

Methods

The IXpsOMDocument interface has these methods.

 
IXpsOMDocument::Clone

Makes a deep copy of the interface. (IXpsOMDocument.Clone)
IXpsOMDocument::GetDocumentStructureResource

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

Gets a pointer to the IXpsOMDocumentSequence interface that contains the document.
IXpsOMDocument::GetPageReferences

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

Gets the IXpsOMPrintTicketResource interface of the document-level print ticket.
IXpsOMDocument::GetSignatureBlockResources

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

Sets the IXpsOMDocumentStructureResource interface for the document.
IXpsOMDocument::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 | 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

IXpsOMObjectFactory::CreateDocument

IXpsOMPart

Interfaces

XML Paper Specification