[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPageSetup.CustomPaperSize

CustomPaperSize Method

CustomPaperSize(double, double)

Sets the custom paper size, in unit of inches.

This method applies a user-defined paper size for the page setup. After calling this method, PaperWidth and PaperHeight return the specified custom dimensions.

Declaration
void CustomPaperSize(double width, double height)
Sub CustomPaperSize(width As Double, height As Double)
Parameters
Type Name Description
double width

The paper width, in inches. Must be greater than 0.

double height

The paper height, in inches. Must be greater than 0.

Examples
IPageSetup pageSetup = worksheet.PageSetup;
pageSetup.CustomPaperSize(8.5, 13);
double paperWidth = pageSetup.PaperWidth;
double paperHeight = pageSetup.PaperHeight;
Exceptions
Type Condition
Exception

if width or height is less than or equal to 0.