[]
A PageInfo object stores the page metadata used during pagination and printing, including the page number, total page count, page content, and page settings. It is typically produced or consumed by PrintManager when working with paginated worksheet content.
PageInfo pageInfo = new PageInfo();
pageInfo.setPageNumber(1);
pageInfo.setPageCount(3);
pageInfo.setPageSettings(new PageSettings());
final PageContentInfofinal intfinal intfinal PageSettingsfinal voidsetPageContent(PageContentInfo value) final voidsetPageCount(int value) final voidsetPageNumber(int value) final voidsetPageSettings(PageSettings value) Returns the page number stored in this PageInfo instance.
PageInfo pageInfo = new PageInfo();
pageInfo.setPageNumber(2);
int pageNumber = pageInfo.getPageNumber();
Sets the page number stored in this PageInfo instance.
PageInfo pageInfo = new PageInfo();
pageInfo.setPageNumber(2);
value - The page number.This value represents the total page count stored in the current PageInfo instance.
PageInfo pageInfo = new PageInfo();
pageInfo.setPageCount(3);
int pageCount = pageInfo.getPageCount();
This value represents the total page count stored in the current PageInfo instance.
PageInfo pageInfo = new PageInfo();
pageInfo.setPageCount(3);
value - The total number of pages.The returned PageContentInfo describes the worksheet content that belongs to the page during pagination and printing, such as the printed range, repeated title or tail rows and columns, header visibility, and zoom factor.
PageInfo pageInfo = new PageInfo();
PageContentInfo pageContent = new PageContentInfo();
pageContent.setRange(worksheet.getRange("A1:C5"));
pageInfo.setPageContent(pageContent);
PageContentInfo content = pageInfo.getPageContent();
PageContentInfo for this page. Returns null if no page content has been assigned.Use this method to assign the PageContentInfo that defines the data area and related print content settings for the page, such as the printed range, title rows, title columns, and header visibility. A value of null removes the current page content information.
PageInfo pageInfo = new PageInfo();
PageContentInfo pageContent = new PageContentInfo();
pageContent.setRange(worksheet.getRange("A1:C10"));
pageInfo.setPageContent(pageContent);
value - The page content information to assign to the page; may be null.This method returns the PageSettings instance currently associated with this PageInfo. If no page settings have been assigned, this method returns null.
PageInfo pageInfo = new PageInfo();
PageSettings pageSettings = new PageSettings();
pageInfo.setPageSettings(pageSettings);
PageSettings settings = pageInfo.getPageSettings();
null if no page settings have been set.Use this method to assign a PageSettings instance that defines page-level printing settings such as paper size, margins, headers, and footers for this PageInfo.
PageInfo pageInfo = new PageInfo();
PageSettings pageSettings = new PageSettings();
pageSettings.setCenterHeader("Budget summary report");
pageInfo.setPageSettings(pageSettings);
value - The page settings to assign to this page; may be null to clear the page settings.