接口 IPageSetup
public interface IPageSetup
Represents the page setup description.
-
方法概要
修饰符和类型方法说明void
customPaperSize
(double width, double height) Sets the custom paper size, in unit of inches.void
Generate the page setup from the json.boolean
Gets True to align the header and the footer with the margins set in the page setup options.boolean
Gets whether column widths are adjusted to fit the longest text width for printing.boolean
Gets whether row heights are adjusted to fit the tallest text height for printing.boolean
True if elements of the document will be printed in black and white.double
Gets the size of the bottom margin, in points.Center aligns the footer information in the PageSetup object.Gets aIGraphic
object that represents the picture for the centersection of the footer.Center aligns the header information in the PageSetup object.Gets aIGraphic
object that represents the picture for the centersection of the header.boolean
True if the sheet is centered horizontally on the page when it's printed.boolean
True if the sheet is centered vertically on the page when it's printed.boolean
True if a different header or footer is used on the first page.boolean
getDraft()
True if the sheet will be printed without graphics.Gets the alignment of text on the evenIPage
of a workbook orsection.Gets the alignment of text on the firstIPage
of a workbook orsection.int
Gets the first page number that will be used when this sheet is printed.int
Gets the number of pages tall the worksheet will be scaled to when it's printed.int
Gets the number of pages wide the worksheet will be scaled to when it's printed.double
Gets the size of the footer margin, in points.double
Gets the size of the header margin, in points.boolean
If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.Gets the alignment of text on the left footer of a workbook or section.Gets aIGraphic
object 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 aIGraphic
object that represents the picture for the leftsection of the header.double
Gets the size of the left margin, in points.boolean
True if the specified PageSetup object has different headers and footers for odd-numbered and even-numbered pages.getOrder()
Gets aOrder
value that represents the order that GcExceluses to number pages when printing a large worksheet.Gets aPageOrientation
value that represents the portrait orlandscape printing mode.double
Represents the height in inches of the paper, considered page orientation.Gets the size of the paper.double
Represents 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.int
Gets number of copies to print.Gets an PrintErrors contstant specifying the type of print error displayed.boolean
True if cell gridlines are printed on the page.boolean
True if row and column headings are printed with this page.boolean
True if 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 aPrintQuality
value 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 aIGraphic
object that represents the picture for the rightsection of the footer.Gets the right part of the header.Gets aIGraphic
object that represents the picture for the rightsection of the header.double
Gets the size of the right margin, in points.boolean
Gets if the header and footer should be scaled with the document when the size of the document changes.double
Gets the size of the top margin, in points.int
getZoom()
Gets a Variant value that represents a percentage (between 10 and 400 percent) by which GcExcel will scale the worksheet for printing.void
setAlignMarginsHeaderFooter
(boolean value) Gets True to align the header and the footer with the margins set in the page setup options.void
setBestFitColumns
(boolean value) Sets whether column widths are adjusted to fit the longest text width for printing.void
setBestFitRows
(boolean value) Sets whether row heights are adjusted to fit the tallest text height for printing.void
setBlackAndWhite
(boolean value) True if elements of the document will be printed in black and white.void
setBottomMargin
(double value) Sets the size of the bottom margin, in points.void
setCenterFooter
(String value) Center aligns the footer information in the PageSetup object.void
setCenterHeader
(String value) Center aligns the header information in the PageSetup object.void
setCenterHorizontally
(boolean value) True if the sheet is centered horizontally on the page when it's printed.void
setCenterVertically
(boolean value) True if the sheet is centered vertically on the page when it's printed.void
setDifferentFirstPageHeaderFooter
(boolean value) True if a different header or footer is used on the first page.void
setDraft
(boolean value) True if the sheet will be printed without graphics.void
setFirstPageNumber
(int value) Sets the first page number that will be used when this sheet is printed.void
setFitToPagesTall
(int value) Sets the number of pages tall the worksheet will be scaled to when it's printed.void
setFitToPagesWide
(int value) Sets the number of pages wide the worksheet will be scaled to when it's printed.void
setFooterMargin
(double value) Sets the size of the footer margin, in points.void
setHeaderMargin
(double value) Sets the size of the header margin, in points.void
setIsPercentScale
(boolean value) If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled.void
setLeftFooter
(String value) Sets the alignment of text on the left footer of a workbook or section.void
setLeftHeader
(String value) Sets the alignment of text on the left header of a workbook or section.void
setLeftMargin
(double value) Sets the size of the left margin, in points.void
setOddAndEvenPagesHeaderFooter
(boolean value) True if the specified PageSetup object has different headers and footers for odd-numbered and even-numbered pages.void
Sets aOrder
value that represents the order that GcExceluses to number pages when printing a large worksheet.void
setOrientation
(PageOrientation value) Sets aPageOrientation
value that represents the portrait orlandscape printing mode.void
setPaperSize
(PaperSize value) Sets the size of the paper.void
setPrintArea
(String value) Sets the range to be printed, as a string using A1-style references in the language of the macro.void
setPrintComments
(PrintLocation value) Sets the way comments are printed with the sheet.void
setPrintCopies
(int value) Sets number of copies to print.void
setPrintErrors
(PrintErrors value) Sets an PrintErrors contstant specifying the type of print error displayed.void
setPrintGridlines
(boolean value) True if cell gridlines are printed on the page.void
setPrintHeadings
(boolean value) True if row and column headings are printed with this page.void
setPrintNotes
(boolean value) True if cell notes are printed as end notes with the sheet.void
setPrintPageRange
(String value) Sets range of pages to print, the numbers or page ranges are separated by commas counting from the beginning of the document.void
setPrintQuality
(PrintQuality value) Sets aPrintQuality
value that represents the print quality of thispage.void
setPrintTailColumns
(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.void
setPrintTailRows
(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.void
setPrintTitleColumns
(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.void
setPrintTitleRows
(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.void
setRightFooter
(String value) Sets the distance (in points) between the right edge of the page and the right boundary of the footer.void
setRightHeader
(String value) Sets the right part of the header.void
setRightMargin
(double value) Sets the size of the right margin, in points.void
setScaleWithDocHeaderFooter
(boolean value) Sets if the header and footer should be scaled with the document when the size of the document changes.void
setTopMargin
(double value) Sets the size of the top margin, in points.void
setZoom
(int value) Sets a Variant value that represents a percentage (between 10 and 400 percent) by which GcExcel will scale the worksheet for printing.toJson()
Generate the json from page setup.
-
方法详细资料
-
getPrintQuality
PrintQuality getPrintQuality()Gets aPrintQuality
value that represents the print quality ofthis page. Default is 600 dpi. -
setPrintQuality
Sets aPrintQuality
value that represents the print quality of thispage. Default is 600 dpi. -
getBlackAndWhite
boolean getBlackAndWhite()True if elements of the document will be printed in black and white. -
setBlackAndWhite
void setBlackAndWhite(boolean value) True if 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()Center aligns the header information in the PageSetup object. -
setCenterHeader
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()True if the sheet is centered horizontally on the page when it's printed. -
setCenterHorizontally
void setCenterHorizontally(boolean value) True if the sheet is centered horizontally on the page when it's printed. -
getCenterVertically
boolean getCenterVertically()True if the sheet is centered vertically on the page when it's printed. -
setCenterVertically
void setCenterVertically(boolean value) True if the sheet is centered vertically on the page when it's printed. -
getDraft
boolean getDraft()True if the sheet will be printed without graphics. -
setDraft
void setDraft(boolean value) True if 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, GcExcel 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, GcExcel chooses the first page number. The default is Automatic. -
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()If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled. -
setIsPercentScale
void setIsPercentScale(boolean value) If this property is False, the FitToPagesWide and FitToPagesTall properties control how the worksheet is scaled. -
getOrder
Order getOrder()Gets aOrder
value that represents the order that GcExceluses to number pages when printing a large worksheet. -
setOrder
Sets aOrder
value that represents the order that GcExceluses to number pages when printing a large worksheet. -
getOrientation
PageOrientation getOrientation()Gets aPageOrientation
value that represents the portrait orlandscape printing mode. -
setOrientation
Sets aPageOrientation
value 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()Represents the width in inches of the paper, considered page orientation. -
getPaperHeight
double getPaperHeight()Represents the height in inches of the paper, considered page orientation. -
getPrintGridlines
boolean getPrintGridlines()True if cell gridlines are printed on the page. Applies only to worksheets. -
setPrintGridlines
void setPrintGridlines(boolean value) True if cell gridlines are printed on the page. Applies only to worksheets. -
getPrintHeadings
boolean getPrintHeadings()True if row and column headings are printed with this page. Applies only to worksheets. -
setPrintHeadings
void setPrintHeadings(boolean value) True if row and column headings are printed with this page. Applies only to worksheets. -
getPrintNotes
boolean getPrintNotes()True if cell notes are printed as end notes with the sheet. Applies only to worksheets. -
setPrintNotes
void setPrintNotes(boolean value) True if 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 GcExcel 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 GcExcel 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 aIGraphic
object that represents the picture for the centersection of the header. Used to set attributes about the picture. -
getLeftHeaderPicture
IGraphic getLeftHeaderPicture()Gets aIGraphic
object that represents the picture for the leftsection of the header. Used to set attributes about the picture. -
getRightHeaderPicture
IGraphic getRightHeaderPicture()Gets aIGraphic
object 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 evenIPage
of a workbook orsection. -
getFirstPage
IPage getFirstPage()Gets the alignment of text on the firstIPage
of 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.- 参数:
json
-
-
toJson
String toJson()Generate the json from page setup.- 返回:
-