D1158: Pixels Unit Mode Unsupported with Print

Direct2D Print: Unsupported SetUnitMode(PIXELS) command was present in command list sent for printing.

 

Possible Causes

Direct2D Print does not allow a unit mode of PIXELS. The default unit mode is DIPS.

Possible Fixes

To address this message, refrain from setting the device context’s unit mode to PIXELS while creating printable content. If it is necessary to apply a global scale transform which affects all primitive-drawing operations, consider whether an equivalent call to ID2D1RenderTarget::SetDpi or ID2D1RenderTarget::SetTransform is sufficient.