Class PrintOptions
Represents the options to send for printing a page.
public class PrintOptions
- Inheritance
-
PrintOptions
- Inherited Members
Properties
Orientation
Gets or sets the orientation of the pages in the printed document.
public PrintOrientation Orientation { get; set; }
Property Value
OutputBackgroundImages
Gets or sets a value indicating whether to print background images in the printed document.
public bool OutputBackgroundImages { get; set; }
Property Value
PageDimensions
Gets or sets the dimensions for each page in the printed document.
public PrintOptions.PageSize PageDimensions { get; set; }
Property Value
Exceptions
- ArgumentNullException
If the value is set to null.
PageMargins
Gets or sets the margins for each page in the doucment.
public PrintOptions.Margins PageMargins { get; set; }
Property Value
Exceptions
- ArgumentNullException
If the value is set to null.
ScaleFactor
Gets or sets the amount which the printed content is zoomed. Valid values are 0.1 to 2.0.
public double ScaleFactor { get; set; }
Property Value
Exceptions
- ArgumentOutOfRangeException
If the value is not set between 0.1 and 2.0.
ShrinkToFit
Gets or sets a value indicating whether to shrink the content to fit the printed page size.
public bool ShrinkToFit { get; set; }
Property Value
Methods
AddPageRangeToPrint(string)
Adds a range of pages to be included in the document.
public void AddPageRangeToPrint(string pageRange)
Parameters
pageRange
stringA string of the form "x-y" representing the page numbers to include.
Exceptions
- ArgumentException
If
pageRange
is null or Empty.-or-
If the requested
pageRange
is already included.-or-
If the requested
pageRange
has multiple '-' separators.-or-
If a bound value is neither empty nor a number.
- ArgumentOutOfRangeException
If
pageRange
has a negative lower bound.-or-
If
pageRange
has an upper bound less than the lower bound.
AddPageToPrint(int)
Adds a page to the list of pages to be included in the document.
public void AddPageToPrint(int pageNumber)
Parameters
pageNumber
intThe page number to be included in the document.
Exceptions
- ArgumentOutOfRangeException
If
pageNumber
is negative.- ArgumentException
If the requested page has already been added.