PrintOptions Class
Specifies information about how a presentation is printed.
- Inheritance:
- System.ObjectPrintOptions
Remarks
For more information, see Print example.
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.
Remarks
For more information, see Print example.
Properties
CopyCount
Gets or sets the number of copies of the presentation to print.
Property Value
- System.Int32
The number of copies of the presentation 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 'Presentation'.
Property Value
- System.String
The name of the printed document in the print queue.
FromSlide
Gets or sets the slide index of the first slide to print.
Property Value
- System.Int32
The slide index of the first slide to print.
Remarks
Presentation slides are zero-indexed meaning that first slide in the presentation has index 0 (zero).
Exceptions
- System.ArgumentException
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.
public double MetafileScaleFactor { get; set; }
Public Property MetafileScaleFactor As Double
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.Presentation 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.
MetafileScaleFactor specifies the size of the bitmap surface, based from the original Metafile surface size, into which Metafile should be drawn / rasterized.
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.
MetafileScaleFactor increases the quality of the Metafile image in PDF file, but it also increases the size of the PDF file because greater MetafileScaleFactor means greater bitmap surface and more space to store bitmap pixel / color data. PNG encoding / compression helps in reducing the space requirement and for complex Metafiles (with a lot of drawing instructions), MetafileScaleFactor of 5 or even greater, might not incur any space overhead relative to the original (complex) Metafile.
Default value for MetafileScaleFactor is 1.
ToSlide
Gets or sets the index of the last slide to print.
Property Value
- System.Int32
The index of the last slide to print.
Remarks
Use System.Int32.MaxValue value to print to the last slide.
Exceptions
- System.ArgumentException
Value cannot be lower than FromSlide.