Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Converts Direct2D primitives in the passed-in command list into a fixed page representation for use by the print subsystem.
Syntax
HRESULT AddPage(
[in] ID2D1CommandList *commandList,
D2D_SIZE_F pageSize,
[in, optional] IStream *pagePrintTicketStream,
[out, optional] D2D1_TAG *tag1,
[out, optional] D2D1_TAG *tag2
);
Parameters
[in] commandList
Type: ID2D1CommandList*
The command list that contains the rendering operations.
pageSize
Type: D2D_SIZE_F
The size of the page to add, in DIPs (1 inch == 96 DIP). If the print driver doesn't respond to this parameter, then you can use pagePrintTicketStream instead.
[in, optional] pagePrintTicketStream
Type: IStream*
The print ticket stream. You can use this to modify properties of the current page; for example, paper size or orientation.
[out, optional] tag1
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.
[out, optional] tag2
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.
HRESULT | Description |
---|---|
S_OK | No error occurred. |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An invalid parameter was passed to the returning function. |
D2DERR_PRINT_JOB_CLOSED | The print job is already finished. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | d2d1_1.h |
Library | D2d1.lib |