Click or drag to resize
PrintOptions Class
Specifies information about how a spreadsheet is printed.
Inheritance Hierarchy

Namespace: GemBox.Spreadsheet
Assembly: GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version:
public sealed class PrintOptions

The PrintOptions type exposes the following members.

Public methodPrintOptions
Initializes a new instance of the PrintOptions class.
Public methodPrintOptions(MemoryStream)
Initializes a new instance of the PrintOptions class by using an XML stream (that contains a PrintTicket document) that complies with the XML Print Schema.
Public propertyCopyCount
Gets or sets the number of copies of the document to print.
Public propertyDocumentName

Gets or sets the name of the printed document in the print queue.

Default value is 'Spreadsheet'.

Public propertyFromPage
Gets or sets the page index of the first page to print.
Public propertyMetafileScaleFactor
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 propertyPagesPerSheet
Gets or sets the number of pages that print on each printed side of a sheet of paper.
Public propertySelectionType
Gets or sets a value indicating whether to save the whole ExcelFile or just ActiveWorksheet.
Public propertyToPage
Gets or sets the index of the last page to print.

Following code demonstrates how to print the whole ExcelFile to the specified printer.

ef.Print(printerName, new PrintOptions()
    CopyCount = 2,
    SelectionType = SelectionType.EntireFile
See Also