Partager via


IXpsOMPackageTarget::CreateXpsOMPackageWriter method

Create an IXpsOMPackageWriter interface for use with a print job that the StartXpsPrintJob1 function created.

Syntax

HRESULT CreateXpsOMPackageWriter(
  [in]           IOpcPartUri               *documentSequencePartName,
  [in, optional] IXpsOMPrintTicketResource *documentSequencePrintTicket,
  [in, optional] IOpcPartUri               *discardControlPartName,
  [out, retval]  IXpsOMPackageWriter       **packageWriter
);

Parameters

  • documentSequencePartName [in]
    The IOpcPartUri interface that contains the part name of the document sequence in the new file.

  • documentSequencePrintTicket [in, optional]
    The IXpsOMPrintTicketResource interface that contains the package-level print ticket to be assigned to the new file. Set this parameter to NULL if you do not have a package-level print ticket.

  • discardControlPartName [in, optional]
    The IOpcPartUri interface that contains the name of the discard control part. Set this parameter to NULL if you do not have a discard control part.

  • packageWriter [out, retval]
    A pointer to the new IXpsOMPackageWriter interface that this method created.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the table that follows. For information about XPS document API return values that are not listed in this table, see XPS Document Errors.

Return code Description
S_OK

The method succeeded.

E_POINTER

packageWriter is NULL.

XPS_E_NO_CUSTOM_OBJECTS

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

 

This method calls the Packaging API. For information about the Packaging API return values, see Packaging Errors.

Requirements

Minimum supported client

Windows 7 with SP1, Windows Vista and Platform Update Supplement for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 with SP1, Windows Server 2008 and Platform Update Supplement for Windows Server 2008 [desktop apps | Windows Store apps]

Header

XpsPrint.h

Library

XpsPrint.lib

See also

StartXpsPrintJob1

IXpsOMPackageTarget

XML Paper Specification