PrintOptions Class
Specifies information about how a document is printed.
- Inheritance:
- System.
Object PrintOptions
Constructors
PrintOptions()
Initializes a new instance of the Print
PrintOptions(Stream)
Initializes a new instance of the Print
Parameters
xmlStream
- System.
IO. Stream
Initializes a new instance of the Print
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.
Argument Exception
Value must be positive.
DocumentName
Gets or sets the name of the printed document in the print queue.
Default value is 'Document'.
Property Value
- System.
String
The name of the printed document in the print queue.
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.
Argument Exception
Value cannot be negative.
MetafileScaleFactor
Gets or sets the scaling factor for rendering metafile (WMF and EMF) images. Greater scaling factor improves quality but also increases file size. Default value is 1.
Property Value
- System.
Double
The metafile scale factor for rendering metafile (WMF and EMF) images.
Remarks
Windows Metafile Format (WMF) and Enhanced Metafile Format (EMF) are vector image formats which contain a series of graphics drawing commands usually executed in Windows GDI layer.
Metafile drawing commands could also be executed in PDF (or XPS) file which is also vector format, but for that Metafile drawing commands would have to be converted to PDF drawing commands.
GemBox.Document currently doesn't perform this conversion of drawing commands, instead it uses Windows GDI to execute Metafile drawing commands into bitmap which is then encoded to PNG format and embedded into PDF file.
Metafile
PDF viewer will still scale the bitmap to the original Metafile size, but if the page is zoomed or viewed on a larger surface, quality of the image will be better since it contains more pixels / dots which will become visible while PDF viewer scales down the image.
Metafile
Default value for Metafile
PagesPerSheet
Gets or sets the number of pages that print on each printed side of a sheet of paper.
Property Value
- System.
Int32
The number of pages that print on each printed side of a sheet of paper.
Remarks
Only a limited range of 1, 2, 4, 6, 8 or 16 pages per sheet side are supported.
Exceptions
- System.
Argument Exception
Value must be 1, 2, 4, 6, 8 or 16.
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.
Exceptions
- System.
Argument Exception
Value cannot be lower than From