DsExcel Java allows users to paginate each worksheet using the methods of the IPageSetup interface.
While exporting a spreadsheet to a PDF file, you can customize the page size, print area, print title rows, print title columns; set horizontal page breaks, vertical page breaks, the maximum number of pages for horizontal and vertical pagination etc. along with zoom and scale factors as per your preferences.
In order to set pagination in a workheet, users can explore the following methods of the IPageSetup interface and the IWorksheet interface:
Methods | Descriptions |
---|---|
Used to get or set the size of each page. For more information on implementation, refer to Configure Paper Size. | |
Used to get or set whether the worksheet should be printed in landscape orientation or portrait orientation. For more information on implementation, refer to Configure Page Orientation. | |
Used to get or set the rows that you want to print at the top of each page. For more information on implementation, refer to Configure Rows to Repeat at Top. | |
Used to get or set the columns that you want to print at the left of each page. For more information on implementation, refer to Configure Columns to Repeat at Left. | |
Used to get or set the print area in a worksheet. If the print area is not specified by the user, the used range of the sheet is printed by default. For more information on implementation, refer to Configure Print Area. | |
Used to get or set the result of zoom while paginating a worksheet. For more information on implementation, refer to Configure Paper Scaling. | |
Used to get or set the maximum number of pages for horizontal pagination. After this method is set, the worksheet can be scaled to fit all columns to the pages. For more information on implementation, refer to Configure Paper Scaling. | |
Used to get or set the maximum number of pages for vertical pagination. After this method is set, the worksheet can be scaled to fit all rows to the pages. For more information on implementation, refer to Configure Paper Scaling. | |
|
Used to get or set a boolean value to control how the worksheet is scaled while exporting to PDF. If the value is set to True, you can use the Zoom method of the IPageSetup interface and if the value is set to false, you can use the FitToPagesWide and FitToPagesTall method of the IPageSetup interface. For more information on implementation, refer to Configure Paper Scaling. |
Used to get the horizontal page breaks that will split rows to multiple pages. However, this method doesn't work when the method setIsPercentScale is set to false. For more information on implementation, refer to Configure Page Breaks. | |
Used to get the vertical page breaks that will split columns to multiple pages. However, this method doesn't work when the method setIsPercentScale is set to false. For more information on implementation, refer to Configure Page Breaks. | |
Used to get or set the page order for each page. For more information on implementation, refer to Configure Page Order. | |
Used to get or set the bottom margins, footer margins, left margins, header margins, right margins and top margins for each page. For more information on implementation of margins in a page, refer to Configure Page Margins. | |
Used to get or set the drafts that are saved for each page. For more information on implementation, refer to Configure Drafts. | |
Used to get or set the print page range while printing a worksheet. For more information on implementation, refer to Configure Print Page Range. | |
IPageSetup.getCenterHorizontally IPageSetup.setCenterHorizontally |
Used to get or set the page center for each page in horizontal and vertical directions. For more information on implementation, refer to Configure Page Center. |
Used to get or set the first page number while exporting a worksheet to PDF or while printing a worksheet. For more information on implementation, refer to Configure First Page Number. |
For more information on setting pagination, refer to Configure Print Settings via Page Setup.