Freigeben über


IXpsOMPage interface

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.

When to implement

Never. Custom implementation of this interface is not supported.

Members

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

  • Methods

Methods

The IXpsOMPage interface has these methods.

Method Description
Clone

Makes a deep copy of the interface.

GenerateUnusedLookupKey

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

GetBleedBox

Gets the dimensions of the page's bleed box.

GetContentBox

Gets the dimensions of the page's content box.

GetDictionary

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

GetDictionaryLocal

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

GetDictionaryResource

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

GetIsHyperlinkTarget

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

GetLanguage

Gets the Language property of the page.

GetName

Gets the Name property of the page.

GetOwner

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

GetPageDimensions

Gets the page dimensions.

GetVisuals

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

SetBleedBox

Sets the dimensions of the page's bleed box.

SetContentBox

Sets the dimensions of the page's content box.

SetDictionaryLocal

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

SetDictionaryResource

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

SetIsHyperlinkTarget

Specifies whether the page is the target of a hyperlink.

SetLanguage

Sets the Language property of the page.

SetName

Sets the Name property of this page.

SetPageDimensions

Sets dimensions of the page.

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

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

IXpsOMPart

IXpsOMObjectFactory::CreatePage

IXpsOMObjectFactory::CreatePageFromStream

Interfaces

Create a Blank XPS OM

Navigate the XPS OM

XML Paper Specification