Windows Dev Center

ID2D1PrintControl::AddPage method

Converts Direct2D primitives in the passed-in command list into a fixed page representation for use by the print subsystem.

Syntax


virtual HRESULT AddPage(
  [in]            ID2D1CommandList *commandList,
                  D2D_SIZE_F       pageSize,
  [in, out]       IStream          *pagePrintTicketStream,
  [out, optional] D2D1_TAG         *tag1 = NULL,
  [out, optional] D2D1_TAG         *tag2 = NULL
) = 0;

Parameters

commandList [in]

Type: ID2D1CommandList*

The command list that contains the rendering operations.

pageSize

Type: D2D_SIZE_F

The size of the page to add.

pagePrintTicketStream [in, out]

Type: IStream*

The print ticket stream.

tag1 [out, optional]

Type: D2D1_TAG*

Contains the first label for subsequent drawing operations. This parameter is passed uninitialized. If NULL is specified, no value is retrieved for this parameter.

tag2 [out, optional]

Type: D2D1_TAG*

Contains the second label for subsequent drawing operations. This parameter is passed uninitialized. If NULL is specified, no value is retrieved for this parameter.

Return value

Type: HRESULT

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

HRESULTDescription
S_OKNo error occurred.
E_OUTOFMEMORYDirect2D could not allocate sufficient memory to complete the call.
E_INVALIDARGAn invalid parameter was passed to the returning function.
D2DERR_PRINT_JOB_CLOSEDThe print job is already finished.

 

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1_1.h

Library

D2d1.lib

See also

ID2D1PrintControl

 

 

Community Additions

ADD
Show:
© 2015 Microsoft