다음을 통해 공유


IXpsOMPageReference::SetPage method

Sets the IXpsOMPage interface of the page reference.

Syntax

HRESULT SetPage(
  [in] IXpsOMPage *page
);

Parameters

  • page [in]
    The IXpsOMPage interface pointer of the page.

Return value

If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code.

Return code Description
S_OK

The method succeeded.

E_POINTER

page is NULL.

XPS_E_NO_CUSTOM_OBJECTS

page does not point to a recognized interface implementation. Custom implementation of XPS Document API interfaces is not supported.

 

Remarks

The page added by this method can be empty or fully constructed.

If the incoming page has references to remote dictionary objects, those objects will not be imported into the document object by this call. They must be added in a separate call to the IXpsOMPage::SetDictionaryResource or IXpsOMCanvas::SetDictionaryResource method.

If a page has been set, the calling method must first release that page before calling SetPage with a new page. To explain, once SetPage has been called with a new page, the original page cannot be discarded even if it still exists in the package.

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

IXpsOMPageReference

IXpsOMPage

IXpsOMPageReference::DiscardPage

IXpsOMPageReference::GetPage

XML Paper Specification