Click or drag to resize
ExcelPrintOptionsPaperType Property
Gets or sets the type of the paper for the page.

Namespace:  GemBox.Spreadsheet
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 41.3.30.1033
Syntax
public PaperType PaperType { get; set; }

Property Value

Type: PaperType
The type of the paper.
Exceptions
ExceptionCondition
ArgumentExceptionThrown if type is set to PaperType.Custom
Remarks

Default value for this property is A4.

This member is supported in printing.

GemBox.Spreadsheet uses enhanced printing services provided with Windows Presentation Foundation (WPF). All pages of a specific ExcelWorksheet will be printed with settings from PrintOptions of that worksheet. Internally, WPF printing uses PrintTicket class to specify page printing settings and value of this member is applied to appropriate member of PrintTicket instance which is used to print all pages of a worksheet with this print options member.

PrintTicket instance which is used to print every page of a worksheet is constructed in following order:

Based on stream specified in PrintOptions(MemoryStream) constructor (base print ticket). Appropriate base print ticket members are set based on PrintOptions instance members values. Base print ticket is cloned for each worksheet, clone's appropriate members are set based on ExcelPrintOptions instance of that worksheet and clone is used to print all pages of that worksheet.

Printing settings which do not exist in PrintOptions nor in ExcelPrintOptions can be specified on base print ticket (which stream is passed to PrintOptions(MemoryStream) constructor).

See Also