IXpsOMDocument::GetPageReferences method

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

Syntax


HRESULT GetPageReferences(
  [out, retval] IXpsOMPageReferenceCollection **pageReferences
);

Parameters

pageReferences [out, retval]

A pointer to the IXpsOMPageReferenceCollection interface that contains a collection of page references for each page of the document. If there are no page references, the IXpsOMPageReferenceCollection returned in pageReferences will be empty and will have no elements.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the table that follows. For information about XPS document API return values that are not listed in this table, see XPS Document Errors.

Return codeDescription
S_OK

The method succeeded.

E_POINTER

pageReferences is NULL.

 

Remarks

To get the pages of a document, first get the list of IXpsOMPageReference interfaces by calling GetPageReferences. Then, for each IXpsOMPageReference interface, load a page by calling GetPage.

If the document does not have any pages, the page reference collection returned in pageReferences will be empty. To get the number of page references in the collection, call its GetCount method.

For an example of how this method can be used in a program, see Navigate the XPS OM.

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

IXpsOMDocument
Navigate the XPS OM
IXpsOMPageReference
IXpsOMPageReferenceCollection
XPS Document Errors
XML Paper Specification

 

 

Show: