Implement Custom Paper Size of Worksheet for Rendering
Contents
[
Hide
]
Possible Usage Scenarios
There is no direct option available to create custom paper sizes in MS Excel, however, you can set custom paper size of your desired worksheets when rendering Excel file to PDF file format. This document explains how to set a custom paper size of a worksheet using Aspose.Cells APIs.
Implement Custom Paper Size of Worksheet for Rendering
Aspose.Cells allows you to implement your desired paper size of the worksheet. You may use the CustomPaperSize method of the PageSetup class to specify a custom page size. The following sample code illustrates how to specify a custom paper size for the first worksheet in the workbook. Please also see the output PDF generated with the following code for a reference.
Screenshot
Sample Code