IXpsOMPageReference::GetPage method (xpsobjectmodel.h)

Gets a pointer to the IXpsOMPage interface that contains the page.

Syntax

HRESULT GetPage(
  [out, retval] IXpsOMPage **page
);

Parameters

[out, retval] page

A pointer to the IXpsOMPage interface of the page. If a page has not been set, a NULL pointer is returned.

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 code Description
S_OK
The method succeeded.
E_POINTER
document is NULL.
 

This method calls the Packaging API. For information about the Packaging API return values, see Packaging Errors.

Remarks

If a page has not been set but the IXpsOMPackage interface that contains the page's reference has loaded from an XPS package, this method will load and return the page. If a page has not been set and the IXpsOMPackage interface that contains this page reference has not loaded from an XPS package, a NULL pointer will be returned.

Depending on the page's contents, this call might take some time to return and it might also cause unexpected changes in other objects in the document tree. For example, if the page has remote resource dictionary references, the remote resource dictionary might get modified.

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

IXpsOMPageReference

IXpsOMPageReference::DiscardPage

IXpsOMPageReference::SetPage

Packaging Errors

XML Paper Specification

XPS Document Errors