System.Drawing.Printing.PrinterSettings.FromPage Property

Gets or sets the page number of the first page to print.

Syntax

public int FromPage { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The PrinterSettings.FromPage and PrinterSettings.ToPage properties are used by the System.Windows.Forms.PrintDialog when the user selects a print range. The System.Windows.Forms.PrintDialog.AllowSomePages property must be set to true to enable the user to specify a print range. In addition, the System.Windows.Forms.PrintDialog requires the PrinterSettings.MinimumPage and PrinterSettings.MaximumPage to be specified and the PrinterSettings.FromPage value to be within that range.

During the printing process, in the PrintDocument.PrintPage event, view the PrinterSettings.PrintRange to determine what should be printed. If PrinterSettings.PrintRange is PrintRange.SomePages, use the PrinterSettings.FromPage and PrinterSettings.ToPage properties to determine what pages should be printed. If PrinterSettings.PrintRange is PrintRange.Selection, then specify output only for the selected pages.

The PrinterSettings.FromPage, PrinterSettings.ToPage and PrinterSettings.PrintRange can also be set programmatically, though the PrintDocument.PrintPage implementation is the same.

Requirements

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