From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

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

Supported for all project types and targets.

The left origin of the printable area.

This should always be zero.


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
Label11.Value = "Left=" + p.Left.ToString