System.Drawing.Printing.PrinterSettings.CreateMeasurementGraphics Method

Returns a System.Drawing.Graphics that contains printer information associated with the specified System.Drawing.Printing.PageSettings.

Syntax

public System.Drawing.Graphics CreateMeasurementGraphics (PageSettings pageSettings)

Parameters

pageSettings
The System.Drawing.Printing.PageSettings to retrieve a graphics object for.

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