IXpsOMPage interface (xpsobjectmodel.h)

Provides the root node of a tree of objects that hold the contents of a single page.

The IXpsOMPage interface corresponds to the FixedPage element in XPS document markup.

Inheritance

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

Methods

The IXpsOMPage interface has these methods.

 
IXpsOMPage::Clone

Makes a deep copy of the interface. (IXpsOMPage.Clone)
IXpsOMPage::GenerateUnusedLookupKey

Generates a unique name that can be used as a lookup key by a resource in a resource dictionary.
IXpsOMPage::GetBleedBox

Gets the dimensions of the page's bleed box.
IXpsOMPage::GetContentBox

Gets the dimensions of the page's content box.
IXpsOMPage::GetDictionary

Gets a pointer to the resolved IXpsOMDictionary interface that is associated with this page.
IXpsOMPage::GetDictionaryLocal

Gets a pointer to the IXpsOMDictionary interface of the local, unshared dictionary that is associated with this page.
IXpsOMPage::GetDictionaryResource

Gets a pointer to the IXpsOMRemoteDictionaryResource interface of the shared dictionary resource that is used by this page.
IXpsOMPage::GetIsHyperlinkTarget

Gets a Boolean value that indicates whether the page is the target of a hyperlink.
IXpsOMPage::GetLanguage

Gets the Language property of the page.
IXpsOMPage::GetName

Gets the Name property of the page.
IXpsOMPage::GetOwner

Gets a pointer to the IXpsOMPageReference interface that contains the page.
IXpsOMPage::GetPageDimensions

Gets the page dimensions.
IXpsOMPage::GetVisuals

Gets a pointer to an IXpsOMVisualCollection interface that contains a collection of the page's visual objects.
IXpsOMPage::SetBleedBox

Sets the dimensions of the page's bleed box.
IXpsOMPage::SetContentBox

Sets the dimensions of the page's content box.
IXpsOMPage::SetDictionaryLocal

Sets the IXpsOMDictionary interface pointer of the page's local dictionary resource.
IXpsOMPage::SetDictionaryResource

Sets the IXpsOMRemoteDictionaryResource interface pointer of the page's remote dictionary resource.
IXpsOMPage::SetIsHyperlinkTarget

Specifies whether the page is the target of a hyperlink.
IXpsOMPage::SetLanguage

Sets the Language property of the page.
IXpsOMPage::SetName

Sets the Name property of this page.
IXpsOMPage::SetPageDimensions

Sets dimensions of the page.
IXpsOMPage::Write

Writes the page to the specified stream.

Remarks

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


IXpsOMPage        *newInterface;
// The following values are defined outside of 
// this example.
//  LPWSTR        language;
//  XPS_SIZE      pageDimensions;

// 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->CreatePage (
            &pageDimensions,
            language,
            partUri,
            &newInterface);

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

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

For information about using this interface in a program, see Create a Blank XPS OM and Navigate the XPS OM.

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

Create a Blank XPS OM

IXpsOMObjectFactory::CreatePage

IXpsOMObjectFactory::CreatePageFromStream

IXpsOMPart

Interfaces

Navigate the XPS OM

XML Paper Specification