[]
A PageContentInfo object describes which worksheet range is printed on a page, along with page content settings such as title rows, tail rows, title columns, tail columns, row headers, column headers, and zoom factor. It is commonly used when customizing page output for printing or PDF export, and can also be obtained from PageInfo.getPageContent().
PageContentInfo pageContent = new PageContentInfo();
pageContent.setRange(worksheet.getRange("A1:F20"));
pageContent.setTitleRowStart(0);
pageContent.setTitleRowEnd(1);
pageContent.setColumnHeaderVisible(true);
final booleanfinal IRangegetRange()booleanfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal doublefinal voidsetColumnHeaderVisible(boolean value) final voidvoidsetRowHeaderVisible(boolean value) final voidsetTailColumnEnd(int value) final voidsetTailColumnStart(int value) final voidsetTailRowEnd(int value) final voidsetTailRowStart(int value) final voidsetTitleColumnEnd(int value) final voidsetTitleColumnStart(int value) final voidsetTitleRowEnd(int value) final voidsetTitleRowStart(int value) final voidsetZoomFactor(double value) Initializes a PageContentInfo instance that can be configured with a printable range and page content settings, such as repeated title rows or visible headers, before it is used for printing or PDF export.
This property indicates whether row headers are included when the page content is rendered for printing.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setRowHeaderVisible(true);
boolean visible = pageContent.getRowHeaderVisible();
true if the row header is printed; otherwise, false.This property indicates whether row headers are included when the page content is rendered for printing.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setRowHeaderVisible(true);
value - true if the row header is printed; otherwise, false.This property indicates whether column headers are included when the page content is rendered for printing.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setColumnHeaderVisible(true);
boolean visible = pageContent.getColumnHeaderVisible();
true if the column header is printed; otherwise, false.This property indicates whether column headers are included when the page content is rendered for printing.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setColumnHeaderVisible(true);
value - true if the column header is printed; otherwise, false.This value controls the print scaling applied to the page content. The returned value is greater than 0.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setZoomFactor(75);
double zoomFactor = pageContent.getZoomFactor();
This value controls the print scaling applied to the page content. The returned value is greater than 0.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setZoomFactor(75);
value - The print scaling percentage for the worksheet.Returns the worksheet range associated with this PageContentInfo instance for page printing or rendering.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setRange(worksheet.getRange("A1:F20"));
IRange range = pageContent.getRange();
null if no range has been set.Use this method to assign the worksheet range associated with this PageContentInfo instance for page printing or rendering. Specify null to clear the currently assigned range.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setRange(worksheet.getRange("A1:F20"));
value - The worksheet range to be printed, or null to clear the current range.Use this method to retrieve the first row index in the title row range for page content printing.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTitleRowStart(0);
int titleRowStart = pageContent.getTitleRowStart();
Use this method to set the first row index in the title row range for page content printing.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTitleRowStart(0);
value - The start index of the rows that are printed at the top of the page.Use this method to retrieve the last row index of the title-row area in a PageContentInfo object.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTitleRowEnd(2);
int titleRowEnd = pageContent.getTitleRowEnd();
Use this method to set the last row index of the title-row area in a PageContentInfo object.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTitleRowEnd(2);
value - The end index of the rows that are printed at the top of the page.Use this method to retrieve the first row index of the tail row area in this PageContentInfo.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTailRowStart(10);
int tailRowStart = pageContent.getTailRowStart();
Use this method to set the first row index of the tail row area in this PageContentInfo.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTailRowStart(10);
value - The start index of the rows that are printed at the bottom of the page.Use this method to retrieve the ending row index for the tail rows in this PageContentInfo.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTailRowEnd(4);
int tailRowEnd = pageContent.getTailRowEnd();
Use this method to set the ending row index for the tail rows in this PageContentInfo.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTailRowEnd(4);
value - The end index of the rows that are printed at the bottom of the page.Use this property to determine the first title column included in the page content.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTitleColumnStart(1);
int titleColumnStart = pageContent.getTitleColumnStart();
Use this property to set the first title column included in the page content.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTitleColumnStart(1);
value - The start index of the columns that are printed at the left of the page.Use this property together with getTitleColumnStart() to define the left-side title column range for page printing.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTitleColumnEnd(2);
int titleColumnEnd = pageContent.getTitleColumnEnd();
Use this property together with getTitleColumnStart() to define the left-side title column range for page printing.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTitleColumnEnd(2);
value - The end index of the columns that are printed at the left of the page.This property identifies the first column in the tail-column area of the page content.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTailColumnStart(4);
int startColumn = pageContent.getTailColumnStart();
This property identifies the first column in the tail-column area of the page content.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTailColumnStart(4);
value - The start index of the columns that are printed at the right of the page.This property identifies the last column in the tail-column area of the page content.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTailColumnStart(4);
pageContent.setTailColumnEnd(6);
int endColumn = pageContent.getTailColumnEnd();
-1 if the tail-column end index has not been set.This property identifies the last column in the tail-column area of the page content.
PageContentInfo pageContent = new PageContentInfo();
pageContent.setTailColumnStart(4);
pageContent.setTailColumnEnd(6);
value - The end index of the columns that are printed at the right of the page. Sets -1 if the tail-column end index has not been set.