PrintOptions Class
Specifies information about how a document is printed.
- Inheritance:
- System.ObjectPrintOptions
Constructors
PrintOptions()
Initializes a new instance of the PrintOptions class.
PrintOptions(Stream)
Initializes a new instance of the PrintOptions class.
Parameters
xmlStream- System.IO.Stream
Initializes a new instance of the PrintOptions class by using an XML stream (that contains a System.Printing.PrintTicket document) that complies with the XML Print Schema.
Properties
CopyCount
Gets or sets the number of copies of the document to print.
Property Value
- System.Int32
The number of copies of the document to print.
Exceptions
- System.ArgumentException
Value must be positive.
DocumentName
Gets or sets the name of the printed document in the print queue.
Default value is 'Pdf'.
Property Value
- System.String
The name of the printed document in the print queue.
Dpi
Gets or sets the resolution (dots or pixels per inch) at which PDF device-dependent features, such as zero stroke width or rasterized shading, should be resolved.
Default value is System.Double.NaN, which means that component specific default value will be used (currently 300).
Property Value
- System.Double
The resolution (dots or pixels per inch) at which PDF device-dependent features, such as zero stroke width or rasterized shading, should be resolved.
Remarks
This property controls the quality of PDF device-dependent features in the printed output. Larger value results in better-quality PDF device-dependent features but might increases the printing time.
Using this property you basically specify the DPI of the display device on which the printed output will be viewed and for which PDF device-dependent features should be optimized for without losing any perceived quality.
Exceptions
- System.ArgumentOutOfRangeException
Value is not greater than 0.
FromPage
Gets or sets the page index of the first page to print.
Property Value
- System.Int32
The page index of the first page to print.
Remarks
Document pages are zero-indexed meaning that first page in the document has index 0 (zero).
Exceptions
- System.ArgumentException
Value cannot be negative.
PageOrientation
Gets or sets the page orientation of the pages to print.
public PrintPageOrientation PageOrientation { get; set; }Public Property PageOrientation As PrintPageOrientationProperty Value
The page orientation of the pages to print.
Remarks
If page orientation is not set or set to Auto and if page has larger width than height then the page will be rotated.
ToPage
Gets or sets the index of the last page to print.
Property Value
- System.Int32
The index of the last page to print.
Remarks
Use System.Int32.MaxValue value to print to the last page.
Exceptions
- System.ArgumentException
Value cannot be lower than FromPage.