Package com.grapecity.documents.excel
Interface IPageSetup
public interface IPageSetup
Represents the page setup description.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcustomPaperSize(double width, double height) Sets the custom paper size, in unit of inches.voidGenerate the page setup from the json.booleanGets whether the header and footer are aligned with the margins set in the page setup options.booleanGets whether column widths are adjusted to fit the longest text width for printing.booleanGets whether row heights are adjusted to fit the tallest text height for printing.booleanGets whether elements of the document will be printed in black and white.doubleGets the size of the bottom margin, in points.Gets whether center aligns the footer information in the PageSetup object.Gets aIGraphicobject that represents the picture for the centersection of the footer.Gets whether center aligns the header information in the PageSetup object.Gets aIGraphicobject that represents the picture for the centersection of the header.booleanGets whether the sheet is centered horizontally on the page when it's printed.booleanGets whether the sheet is centered vertically on the page when it's printed.booleanGets whether a different header or footer is used on the first page.booleangetDraft()Gets whether the sheet will be printed without graphics.Gets the alignment of text on the evenIPageof a workbook orsection.Gets the alignment of text on the firstIPageof a workbook orsection.intGets the first page number that will be used when this sheet is printed.intGets the number of pages tall the worksheet will be scaled to when it's printed.intGets the number of pages wide the worksheet will be scaled to when it's printed.doubleGets the size of the footer margin, in points.doubleGets the size of the header margin, in points.booleanGets whether the first page number is automatically assigned.booleanGets whether the worksheet is scaled as a percentage.Gets the alignment of text on the left footer of a workbook or section.Gets aIGraphicobject that represents the picture for the leftsection of the footer.Gets the alignment of text on the left header of a workbook or section.Gets aIGraphicobject that represents the picture for the leftsection of the header.doubleGets the size of the left margin, in points.booleanGets whether the specified PageSetup object has different headers and footers for odd-numbered and even-numbered pages.getOrder()Gets aOrdervalue that represents the orderuses to number pages when printing a large worksheet.Gets aPageOrientationvalue that represents the portrait orlandscape printing mode.doubleSets the height in inches of the paper, considered page orientation.Gets the size of the paper.doubleGets the width in inches of the paper, considered page orientation.Gets the range to be printed, as a string using A1-style references in the language of the macro.Gets the way comments are printed with the sheet.intGets number of copies to print.Gets an PrintErrors contstant specifying the type of print error displayed.booleanGets whether cell gridlines are printed on the page.booleanGets whether row and column headings are printed with this page.booleanGets whether cell notes are printed as end notes with the sheet.Gets range of pages to print, the numbers or page ranges are separated by commas counting from the beginning of the document.Gets aPrintQualityvalue that represents the print quality ofthis page.Gets the columns that contain the cells to be repeated on the right side of each page, as a string in A1-style notation in the language of the macro.Gets the rows that contain the cells to be repeated on the bottom of each page, as a string in A1-style notation in the language of the macro.Gets the columns that contain the cells to be repeated on the left side of each page, as a string in A1-style notation in the language of the macro.Gets the rows that contain the cells to be repeated at the top of each page, as a string in A1-style notation in the language of the macro.Gets the distance (in points) between the right edge of the page and the right boundary of the footer.Gets aIGraphicobject that represents the picture for the rightsection of the footer.Gets the right part of the header.Gets aIGraphicobject that represents the picture for the rightsection of the header.doubleGets the size of the right margin, in points.booleanGets if the header and footer should be scaled with the document when the size of the document changes.doubleGets the size of the top margin, in points.intgetZoom()Gets a Variant value that represents a percentage (between 10 and 400 percent) by which Document Solutions for Excel will scale the worksheet for printing.voidsetAlignMarginsHeaderFooter(boolean value) Sets whether the header and footer should be aligned with the margins set in the page setup options.voidsetBestFitColumns(boolean value) Sets whether column widths are adjusted to fit the longest text width for printing.voidsetBestFitRows(boolean value) Sets whether row heights are adjusted to fit the tallest text height for printing.voidsetBlackAndWhite(boolean value) Sets whether elements of the document will be printed in black and white.voidsetBottomMargin(double value) Sets the size of the bottom margin, in points.voidsetCenterFooter(String value) Sets whether center aligns the footer information in the PageSetup object.voidsetCenterHeader(String value) Sets whether center aligns the header information in the PageSetup object.voidsetCenterHorizontally(boolean value) Sets whether the sheet is centered horizontally on the page when it's printed.voidsetCenterVertically(boolean value) Sets whether the sheet is centered vertically on the page when it's printed.voidsetDifferentFirstPageHeaderFooter(boolean value) Sets whether a different header or footer is used on the first page.voidsetDraft(boolean value) Sets whether the sheet will be printed without graphics.voidsetFirstPageNumber(int value) Sets the first page number that will be used when this sheet is printed.voidsetFitToPagesTall(int value) Sets the number of pages tall the worksheet will be scaled to when it's printed.voidsetFitToPagesWide(int value) Sets the number of pages wide the worksheet will be scaled to when it's printed.voidsetFooterMargin(double value) Sets the size of the footer margin, in points.voidsetHeaderMargin(double value) Sets the size of the header margin, in points.voidsetIsAutoFirstPageNumber(boolean value) Sets whether the first page number is automatically assigned.voidsetIsPercentScale(boolean value) Sets whether the worksheet is scaled as a percentage.voidsetLeftFooter(String value) Sets the alignment of text on the left footer of a workbook or section.voidsetLeftHeader(String value) Sets the alignment of text on the left header of a workbook or section.voidsetLeftMargin(double value) Sets the size of the left margin, in points.voidsetOddAndEvenPagesHeaderFooter(boolean value) Sets whether the specified PageSetup object has different headers and footers for odd-numbered and even-numbered pages.voidSets aOrdervalue that represents the orderuses to number pages when printing a large worksheet.voidsetOrientation(PageOrientation value) Sets aPageOrientationvalue that represents the portrait orlandscape printing mode.voidsetPaperSize(PaperSize value) Sets the size of the paper.voidsetPrintArea(String value) Sets the range to be printed, as a string using A1-style references in the language of the macro.voidsetPrintComments(PrintLocation value) Sets the way comments are printed with the sheet.voidsetPrintCopies(int value) Sets number of copies to print.voidsetPrintErrors(PrintErrors value) Sets an PrintErrors contstant specifying the type of print error displayed.voidsetPrintGridlines(boolean value) Sets whether cell gridlines are printed on the page.voidsetPrintHeadings(boolean value) Sets whether row and column headings are printed with this page.voidsetPrintNotes(boolean value) Sets whether cell notes are printed as end notes with the sheet.voidsetPrintPageRange(String value) Sets range of pages to print, the numbers or page ranges are separated by commas counting from the beginning of the document.voidsetPrintQuality(PrintQuality value) Sets aPrintQualityvalue that represents the print quality of thispage.voidsetPrintTailColumns(String value) Sets the columns that contain the cells to be repeated on the right side of each page, as a string in A1-style notation in the language of the macro.voidsetPrintTailRows(String value) Sets the rows that contain the cells to be repeated on the bottom of each page, as a string in A1-style notation in the language of the macro.voidsetPrintTitleColumns(String value) Sets the columns that contain the cells to be repeated on the left side of each page, as a string in A1-style notation in the language of the macro.voidsetPrintTitleRows(String value) Sets the rows that contain the cells to be repeated at the top of each page, as a string in A1-style notation in the language of the macro.voidsetRightFooter(String value) Sets the distance (in points) between the right edge of the page and the right boundary of the footer.voidsetRightHeader(String value) Sets the right part of the header.voidsetRightMargin(double value) Sets the size of the right margin, in points.voidsetScaleWithDocHeaderFooter(boolean value) Sets if the header and footer should be scaled with the document when the size of the document changes.voidsetTopMargin(double value) Sets the size of the top margin, in points.voidsetZoom(int value) Sets a Variant value that represents a percentage (between 10 and 400 percent) by which Document Solutions for Excel will scale the worksheet for printing.toJson()Generate the json from page setup.
-
Method Details
-
getPrintQuality
PrintQuality getPrintQuality()Gets aPrintQualityvalue that represents the print quality ofthis page. Default is 600 dpi. -
setPrintQuality
Sets aPrintQualityvalue that represents the print quality of thispage. Default is 600 dpi. -
getBlackAndWhite
boolean getBlackAndWhite()Gets whether elements of the document will be printed in black and white. -
setBlackAndWhite
void setBlackAndWhite(boolean value) Sets whether elements of the document will be printed in black and white. -
getLeftMargin
double getLeftMargin()Gets the size of the left margin, in points. -
setLeftMargin
void setLeftMargin(double value) Sets the size of the left margin, in points. -
getRightMargin
double getRightMargin()Gets the size of the right margin, in points. -
setRightMargin
void setRightMargin(double value) Sets the size of the right margin, in points. -
getTopMargin
double getTopMargin()Gets the size of the top margin, in points. -
setTopMargin
void setTopMargin(double value) Sets the size of the top margin, in points. -
getBottomMargin
double getBottomMargin()Gets the size of the bottom margin, in points. -
setBottomMargin
void setBottomMargin(double value) Sets the size of the bottom margin, in points. -
getHeaderMargin
double getHeaderMargin()Gets the size of the header margin, in points. -
setHeaderMargin
void setHeaderMargin(double value) Sets the size of the header margin, in points. -
getCenterHeader
String getCenterHeader()Gets whether center aligns the header information in the PageSetup object. -
setCenterHeader
Sets whether center aligns the header information in the PageSetup object. -
getLeftHeader
String getLeftHeader()Gets the alignment of text on the left header of a workbook or section. -
setLeftHeader
Sets the alignment of text on the left header of a workbook or section. -
getRightHeader
String getRightHeader()Gets the right part of the header. -
setRightHeader
Sets the right part of the header. -
getCenterHorizontally
boolean getCenterHorizontally()Gets whether the sheet is centered horizontally on the page when it's printed. -
setCenterHorizontally
void setCenterHorizontally(boolean value) Sets whether the sheet is centered horizontally on the page when it's printed. -
getCenterVertically
boolean getCenterVertically()Gets whether the sheet is centered vertically on the page when it's printed. -
setCenterVertically
void setCenterVertically(boolean value) Sets whether the sheet is centered vertically on the page when it's printed. -
getDraft
boolean getDraft()Gets whether the sheet will be printed without graphics. -
setDraft
void setDraft(boolean value) Sets whether the sheet will be printed without graphics. -
getFirstPageNumber
int getFirstPageNumber()Gets the first page number that will be used when this sheet is printed. If Automatic, Document Solutions for Excel chooses the first page number. The default is Automatic. -
setFirstPageNumber
void setFirstPageNumber(int value) Sets the first page number that will be used when this sheet is printed. If Automatic, Document Solutions for Excel chooses the first page number. The default is Automatic. -
getIsAutoFirstPageNumber
boolean getIsAutoFirstPageNumber()Gets whether the first page number is automatically assigned. The default is true. When the first page number is specified, it returns false. -
setIsAutoFirstPageNumber
void setIsAutoFirstPageNumber(boolean value) Sets whether the first page number is automatically assigned. The default is true. -
getFitToPagesTall
int getFitToPagesTall()Gets the number of pages tall the worksheet will be scaled to when it's printed. Applies only to worksheets. -
setFitToPagesTall
void setFitToPagesTall(int value) Sets the number of pages tall the worksheet will be scaled to when it's printed. Applies only to worksheets. -
getFitToPagesWide
int getFitToPagesWide()Gets the number of pages wide the worksheet will be scaled to when it's printed. Applies only to worksheets. -
setFitToPagesWide
void setFitToPagesWide(int value) Sets the number of pages wide the worksheet will be scaled to when it's printed. Applies only to worksheets. -
getIsPercentScale
boolean getIsPercentScale()Gets whether the worksheet is scaled as a percentage.- Returns:
- True if the worksheet is scaled as a percentage;False if the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.
-
setIsPercentScale
void setIsPercentScale(boolean value) Sets whether the worksheet is scaled as a percentage.- Parameters:
value- If this property is true, the worksheet is scaled as a percentage;If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.
-
getOrder
Order getOrder()Gets aOrdervalue that represents the orderuses to number pages when printing a large worksheet. -
setOrder
Sets aOrdervalue that represents the orderuses to number pages when printing a large worksheet. -
getOrientation
PageOrientation getOrientation()Gets aPageOrientationvalue that represents the portrait orlandscape printing mode. -
setOrientation
Sets aPageOrientationvalue that represents the portrait orlandscape printing mode. -
getPaperSize
PaperSize getPaperSize()Gets the size of the paper. -
setPaperSize
Sets the size of the paper. -
customPaperSize
void customPaperSize(double width, double height) Sets the custom paper size, in unit of inches. -
getPaperWidth
double getPaperWidth()Gets the width in inches of the paper, considered page orientation. -
getPaperHeight
double getPaperHeight()Sets the height in inches of the paper, considered page orientation. -
getPrintGridlines
boolean getPrintGridlines()Gets whether cell gridlines are printed on the page. Applies only to worksheets. -
setPrintGridlines
void setPrintGridlines(boolean value) Sets whether cell gridlines are printed on the page. Applies only to worksheets. -
getPrintHeadings
boolean getPrintHeadings()Gets whether row and column headings are printed with this page. Applies only to worksheets. -
setPrintHeadings
void setPrintHeadings(boolean value) Sets whether row and column headings are printed with this page. Applies only to worksheets. -
getPrintNotes
boolean getPrintNotes()Gets whether cell notes are printed as end notes with the sheet. Applies only to worksheets. -
setPrintNotes
void setPrintNotes(boolean value) Sets whether cell notes are printed as end notes with the sheet. Applies only to worksheets. -
getPrintArea
String getPrintArea()Gets the range to be printed, as a string using A1-style references in the language of the macro. -
setPrintArea
Sets the range to be printed, as a string using A1-style references in the language of the macro. -
getPrintTitleColumns
String getPrintTitleColumns()Gets the columns that contain the cells to be repeated on the left side of each page, as a string in A1-style notation in the language of the macro. -
setPrintTitleColumns
Sets the columns that contain the cells to be repeated on the left side of each page, as a string in A1-style notation in the language of the macro. -
getPrintTitleRows
String getPrintTitleRows()Gets the rows that contain the cells to be repeated at the top of each page, as a string in A1-style notation in the language of the macro. -
setPrintTitleRows
Sets the rows that contain the cells to be repeated at the top of each page, as a string in A1-style notation in the language of the macro. -
getPrintTailColumns
String getPrintTailColumns()Gets the columns that contain the cells to be repeated on the right side of each page, as a string in A1-style notation in the language of the macro. -
setPrintTailColumns
Sets the columns that contain the cells to be repeated on the right side of each page, as a string in A1-style notation in the language of the macro. -
getPrintTailRows
String getPrintTailRows()Gets the rows that contain the cells to be repeated on the bottom of each page, as a string in A1-style notation in the language of the macro. -
setPrintTailRows
Sets the rows that contain the cells to be repeated on the bottom of each page, as a string in A1-style notation in the language of the macro. -
getPrintCopies
int getPrintCopies()Gets number of copies to print. -
setPrintCopies
void setPrintCopies(int value) Sets number of copies to print. -
getPrintPageRange
String getPrintPageRange()Gets range of pages to print, the numbers or page ranges are separated by commas counting from the beginning of the document. For example, type "1,3,5-12". -
setPrintPageRange
Sets range of pages to print, the numbers or page ranges are separated by commas counting from the beginning of the document. For example, type "1,3,5-12". -
getZoom
int getZoom()Gets a Variant value that represents a percentage (between 10 and 400 percent) by which Document Solutions for Excel will scale the worksheet for printing. -
setZoom
void setZoom(int value) Sets a Variant value that represents a percentage (between 10 and 400 percent) by which Document Solutions for Excel will scale the worksheet for printing. -
getPrintComments
PrintLocation getPrintComments()Gets the way comments are printed with the sheet. -
setPrintComments
Sets the way comments are printed with the sheet. -
getPrintErrors
PrintErrors getPrintErrors()Gets an PrintErrors contstant specifying the type of print error displayed. This feature allows users to suppress the display of error values when printing a worksheet. -
setPrintErrors
Sets an PrintErrors contstant specifying the type of print error displayed. This feature allows users to suppress the display of error values when printing a worksheet. -
getCenterHeaderPicture
IGraphic getCenterHeaderPicture()Gets aIGraphicobject that represents the picture for the centersection of the header. Used to set attributes about the picture. -
getLeftHeaderPicture
IGraphic getLeftHeaderPicture()Gets aIGraphicobject that represents the picture for the leftsection of the header. Used to set attributes about the picture. -
getRightHeaderPicture
IGraphic getRightHeaderPicture()Gets aIGraphicobject that represents the picture for the rightsection of the header. Used to set attributes of the picture. -
getEvenPage
IPage getEvenPage()Gets the alignment of text on the evenIPageof a workbook orsection. -
getFirstPage
IPage getFirstPage()Gets the alignment of text on the firstIPageof a workbook orsection. -
getBestFitColumns
boolean getBestFitColumns()Gets whether column widths are adjusted to fit the longest text width for printing. -
setBestFitColumns
void setBestFitColumns(boolean value) Sets whether column widths are adjusted to fit the longest text width for printing. May cause some efficiency problems if the file contains large amounts of data. -
getBestFitRows
boolean getBestFitRows()Gets whether row heights are adjusted to fit the tallest text height for printing. -
setBestFitRows
void setBestFitRows(boolean value) Sets whether row heights are adjusted to fit the tallest text height for printing. May cause some efficiency problems if the file contains large amounts of data. -
fromJson
Generate the page setup from the json.- Parameters:
json- The JSON string representing the page setup.
-
toJson
String toJson()Generate the json from page setup.- Returns:
- The JSON string representing the page setup.
-