System.Drawing.Printing.PrinterSettings.CreateMeasurementGraphics Method

Returns a System.Drawing.Graphics that contains printer information, optionally specifying the origin at the margins.

Syntax

public System.Drawing.Graphics CreateMeasurementGraphics (bool honorOriginAtMargins)

Parameters

honorOriginAtMargins
true to indicate the origin at the margins; otherwise, false.

Returns

A System.Drawing.Graphics that contains printer information from the System.Drawing.Printing.PageSettings.

Remarks

With the PrinterSettings.CreateMeasurementGraphics method, you can obtain a System.Drawing.Graphics for the printer without creating a print job. Use the System.Drawing.Graphics to make decisions on how to layout visual elements like fonts, sizes, and type styles of a complex print job.

Requirements

Namespace: System.Drawing.Printing
Assembly: System.Drawing (in System.Drawing.dll)
Assembly Versions: 2.0.0.0