PrinterSetup.PageLeft

From Xojo Documentation

Read-Only Property (As Integer )
IntegerValue = aPrinterSetup.PageLeft

Supported for all project types and targets.

The offset distance (in pixels) from the left margin of the printable area to the left edge of the physical page, i.e., the left margin.

Example

This example displays the Page Setup box and then displays the page size, printable area, and margins in Label controls. Results, of course, depend on the page size that the user selects. Since PageLeft and PageTop are the horizontal and vertical margins as measured from the printable area rather than the edge of the page, they are negative.

Var settings As String
Var p As PrinterSetup
p = New PrinterSetup
If p.PageSetupDialog Then
settings = p.SetupString
End If

Label1.Value = "PageLeft=" + p.PageLeft.ToString
Label2.Value = "PageTop=" + p.PageTop.ToString
Label3.Value = "PageHeight=" + p.PageHeight.ToString
Label4.Value = "PageWidth=" + p.PageWidth.ToString
Label5.Value = "Height=" + p.Height.ToString
Label6.Value = "Width=" + p.Width.ToString
Label7.Value = "Computed height=" + Str(p.Height - 2 * p.PageTop)
Label8.Value = "Computed width=" + Str(p.Width - 2 * p.PageLeft)
Label9.Value = "Horizontal resolution=" + p.HorizontalResolution.ToString
Label10.Value = "Vertical Resolution=" + p.VerticalResolution.ToString