How to: Set Paper Size
Important
The Universal Subscription or an additional Document Server Subscription is required to use this example in production code. Please refer to the DevExpress Subscription page for pricing information.
This example demonstrates how to set the paper size of worksheet pages via the WorksheetView.PaperKind property of the worksheet view object accessed via Worksheet.ActiveView. The PaperKind enumerator lists available page sizes.
Note
The WorksheetView.PaperKind property value is used when worksheet pages are printed. To learn how to specify other worksheet print options, see the How to: Specify Print Settings document.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/spreadsheet-document-server-api-e4339
// Select the page's paper size.
workbook.Worksheets[0].ActiveView.PaperKind = System.Drawing.Printing.PaperKind.A4;