Chỉnh sửa

Chia sẻ qua


IXpsOMDocumentSequence interface (xpsobjectmodel.h)

The root object that has the XPS document content.

Inheritance

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

Methods

The IXpsOMDocumentSequence interface has these methods.

 
IXpsOMDocumentSequence::GetDocuments

Gets a pointer to the IXpsOMDocumentCollection interface, which contains the documents specified in the document sequence.
IXpsOMDocumentSequence::GetOwner

Gets a pointer to the IXpsOMPackage interface that contains the document sequence.
IXpsOMDocumentSequence::GetPrintTicketResource

Gets the IXpsOMPrintTicketResource interface to the job-level print ticket that is assigned to the document sequence.
IXpsOMDocumentSequence::SetPrintTicketResource

Sets the job-level print ticket resource for the document sequence.

Remarks

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


IXpsOMDocumentSequence    *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->CreateDocumentSequence (partUri, &newInterface);

        if (SUCCEEDED(hr))
        {
            // use newInterface

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

Requirements

Requirement Value
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::CreateDocumentSequence

IXpsOMPart

Interfaces

XML Paper Specification