共用方式為


IXpsOMPageReference interface

Enables virtualization of pages in an XPS document.

A page reference defers loading of the full object model of a page until the page is requested. If the page has not been altered, it can also be unloaded on request.

When to implement

Never. Custom implementation of this interface is not supported.

Members

The IXpsOMPageReference interface inherits from the IUnknown interface. IXpsOMPageReference also has these types of members:

  • Methods

Methods

The IXpsOMPageReference interface has these methods.

Method Description
Clone

Makes a deep copy of the interface.

CollectLinkTargets

Gets an IXpsOMNameCollection interface that contains the names of all the document sub-tree objects whose IsHyperlinkTarget property is set to true.

CollectPartResources

Creates a list of all part-based resources that are associated with the page.

DiscardPage

Discards the page from memory.

GetAdvisoryPageDimensions

Gets the suggested dimensions of the page.

GetOwner

Gets a pointer to the IXpsOMDocument interface that contains the page reference.

GetPage

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

GetPrintTicketResource

Gets a pointer to the IXpsOMPrintTicketResource interface of the page-level print ticket resource that is associated with the page.

GetStoryFragmentsResource

Gets a pointer to the IXpsOMStoryFragmentsResource interface of the StoryFragments part resource that is associated with the page.

GetThumbnailResource

Gets a pointer to the IXpsOMImageResource interface of the thumbnail image resource that is associated with the page.

HasRestrictedFonts

Gets a Boolean value that indicates whether the document sub-tree of the referenced page includes any Glyphs that have a font resource whose EmbeddingOption property is set to XPS_FONT_EMBEDDING_RESTRICTED.

IsPageLoaded

Gets the referenced page status, which indicates whether the page is loaded.

SetAdvisoryPageDimensions

Sets the suggested dimensions of the page.

SetPage

Sets the IXpsOMPage interface of the page reference.

SetPrintTicketResource

Sets the IXpsOMPrintTicketResource interface pointer of the page-level print ticket resource that is to be assigned to the page.

SetStoryFragmentsResource

Sets the IXpsOMStoryFragmentsResource interface pointer of the StoryFragments resource to be assigned to the page.

SetThumbnailResource

Sets the pointer to the IXpsOMImageResource interface of the thumbnail image resource to be assigned to the page.

 

Remarks

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

IXpsOMPageReference    *newInterface;
// The following value is defined outside of 
// this example.
XPS_SIZE        advisoryPageDimensions;

// 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->CreatePageReference (
        &advisoryPageDimensions,
        &newInterface);

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

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

IXpsOMObjectFactory::CreatePageReference

Interfaces

IXpsOMDocumentStructureResource

IXpsOMImageResource

IXpsOMNameCollection

IXpsOMPage

IXpsOMPrintTicketResource

IXpsOMStoryFragmentsResource

Create a Blank XPS OM

Navigate the XPS OM

XML Paper Specification