PrinterSettings.CreateMeasurementGraphics Method (PageSettings, Boolean)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a Graphics associated with the specified page settings and optionally specifying the origin at the margins.

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

public Graphics CreateMeasurementGraphics(
	PageSettings pageSettings,
	bool honorOriginAtMargins
)

Parameters

pageSettings
Type: System.Drawing.Printing.PageSettings

The PageSettings to retrieve a Graphics object for.

honorOriginAtMargins
Type: System.Boolean

true to specify the origin at the margins; otherwise, false.

Return Value

Type: System.Drawing.Graphics

A Graphics that contains printer information from the PageSettings.

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

.NET Framework
Available since 2.0
Return to top
Show: