Skip to content

Latest commit

 

History

History
141 lines (102 loc) · 3.86 KB

nn-xpsobjectmodel-ixpsompage.md

File metadata and controls

141 lines (102 loc) · 3.86 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NN:xpsobjectmodel.IXpsOMPage
IXpsOMPage (xpsobjectmodel.h)
Provides the root node of a tree of objects that hold the contents of a single page.
IXpsOMPage
IXpsOMPage interface [XPS Documents and Packaging]
IXpsOMPage interface [XPS Documents and Packaging]
described
xps.ixpsompage
xpsobjectmodel/IXpsOMPage
xps\ixpsompage.htm
xps
741deebd-9dce-4cd9-883e-4586c10a4609
12/05/2018
IXpsOMPage, IXpsOMPage interface [XPS Documents and Packaging], IXpsOMPage interface [XPS Documents and Packaging],described, xps.ixpsompage, xpsobjectmodel/IXpsOMPage
xpsobjectmodel.h
Windows
Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps \| UWP apps]
XpsObjectModel.idl
Windows
19H1
IXpsOMPage
xpsobjectmodel/IXpsOMPage
c++
APIRef
kbSyntax
COM
xpsobjectmodel.h
IXpsOMPage

IXpsOMPage interface

-description

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:

-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.

-see-also

Create a Blank XPS OM

IXpsOMObjectFactory::CreatePage

IXpsOMObjectFactory::CreatePageFromStream

IXpsOMPart

Interfaces

Navigate the XPS OM

XML Paper Specification