[]
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.
void CustomPaperSize(double width, double height)
Sub CustomPaperSize(width As Double, height As Double)
| Type | Name | Description |
|---|---|---|
| double | width | The paper width, in inches. Must be greater than |
| double | height | The paper height, in inches. Must be greater than |
IPageSetup pageSetup = worksheet.PageSetup;
pageSetup.CustomPaperSize(8.5, 13);
double paperWidth = pageSetup.PaperWidth;
double paperHeight = pageSetup.PaperHeight;
| Type | Condition |
|---|---|
| Exception | if |