接口 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 a IGraphic object that represents the picture for the centersection of the footer.
    Center aligns the header information in the PageSetup object.
    Gets a IGraphic 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
    True if the sheet will be printed without graphics.
    Gets the alignment of text on the even IPage of a workbook orsection.
    Gets the alignment of text on the first IPage 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 a IGraphic 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 a IGraphic 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.
    Gets a Order value that represents the order that GcExceluses to number pages when printing a large worksheet.
    Gets a PageOrientation 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 a PrintQuality 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 a IGraphic object that represents the picture for the rightsection of the footer.
    Gets the right part of the header.
    Gets a IGraphic 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
    Gets a Variant value that represents a percentage (between 10 and 400 percent) by which GcExcel will scale the worksheet for printing.
    void
    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
    Center aligns the footer information in the PageSetup object.
    void
    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
    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
    Sets the alignment of text on the left footer of a workbook or section.
    void
    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
    True if the specified PageSetup object has different headers and footers for odd-numbered and even-numbered pages.
    void
    setOrder(Order value)
    Sets a Order value that represents the order that GcExceluses to number pages when printing a large worksheet.
    void
    Sets a PageOrientation value that represents the portrait orlandscape printing mode.
    void
    Sets the size of the paper.
    void
    Sets the range to be printed, as a string using A1-style references in the language of the macro.
    void
    Sets the way comments are printed with the sheet.
    void
    setPrintCopies(int value)
    Sets number of copies to print.
    void
    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
    Sets range of pages to print, the numbers or page ranges are separated by commas counting from the beginning of the document.
    void
    Sets a PrintQuality value that represents the print quality of thispage.
    void
    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
    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
    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
    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
    Sets the distance (in points) between the right edge of the page and the right boundary of the footer.
    void
    Sets the right part of the header.
    void
    setRightMargin(double value)
    Sets the size of the right margin, in points.
    void
    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.
    Generate the json from page setup.
  • 方法详细资料

    • getPrintQuality

      PrintQuality getPrintQuality()
      Gets a PrintQuality value that represents the print quality ofthis page. Default is 600 dpi.
    • setPrintQuality

      void setPrintQuality(PrintQuality value)
      Sets a PrintQuality 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.
    • getFooterMargin

      double getFooterMargin()
      Gets the size of the footer margin, in points.
    • setFooterMargin

      void setFooterMargin(double value)
      Sets the size of the footer margin, in points.
    • getCenterFooter

      String getCenterFooter()
      Center aligns the footer information in the PageSetup object.
    • setCenterFooter

      void setCenterFooter(String value)
      Center aligns the footer information in the PageSetup object.
    • getCenterHeader

      String getCenterHeader()
      Center aligns the header information in the PageSetup object.
    • setCenterHeader

      void setCenterHeader(String value)
      Center aligns the header information in the PageSetup object.
    • getLeftFooter

      String getLeftFooter()
      Gets the alignment of text on the left footer of a workbook or section.
    • setLeftFooter

      void setLeftFooter(String value)
      Sets the alignment of text on the left footer of a workbook or section.
    • getLeftHeader

      String getLeftHeader()
      Gets the alignment of text on the left header of a workbook or section.
    • setLeftHeader

      void setLeftHeader(String value)
      Sets the alignment of text on the left header of a workbook or section.
    • getRightFooter

      String getRightFooter()
      Gets the distance (in points) between the right edge of the page and the right boundary of the footer.
    • setRightFooter

      void setRightFooter(String value)
      Sets the distance (in points) between the right edge of the page and the right boundary of the footer.
    • getRightHeader

      String getRightHeader()
      Gets the right part of the header.
    • setRightHeader

      void setRightHeader(String value)
      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.
    • getOddAndEvenPagesHeaderFooter

      boolean getOddAndEvenPagesHeaderFooter()
      True if the specified PageSetup object has different headers and footers for odd-numbered and even-numbered pages.
    • setOddAndEvenPagesHeaderFooter

      void setOddAndEvenPagesHeaderFooter(boolean value)
      True if the specified PageSetup object has different headers and footers for odd-numbered and even-numbered pages.
    • getDifferentFirstPageHeaderFooter

      boolean getDifferentFirstPageHeaderFooter()
      True if a different header or footer is used on the first page.
    • setDifferentFirstPageHeaderFooter

      void setDifferentFirstPageHeaderFooter(boolean value)
      True if a different header or footer is used on the first page.
    • getScaleWithDocHeaderFooter

      boolean getScaleWithDocHeaderFooter()
      Gets if the header and footer should be scaled with the document when the size of the document changes.
    • setScaleWithDocHeaderFooter

      void setScaleWithDocHeaderFooter(boolean value)
      Sets if the header and footer should be scaled with the document when the size of the document changes.
    • getAlignMarginsHeaderFooter

      boolean getAlignMarginsHeaderFooter()
      Gets True to align the header and the footer with the margins set in the page setup options.
    • setAlignMarginsHeaderFooter

      void setAlignMarginsHeaderFooter(boolean value)
      Gets True to align the header and the footer with the margins set in the page setup options.
    • 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 a Order value that represents the order that GcExceluses to number pages when printing a large worksheet.
    • setOrder

      void setOrder(Order value)
      Sets a Order value that represents the order that GcExceluses to number pages when printing a large worksheet.
    • getOrientation

      PageOrientation getOrientation()
      Gets a PageOrientation value that represents the portrait orlandscape printing mode.
    • setOrientation

      void setOrientation(PageOrientation value)
      Sets a PageOrientation value that represents the portrait orlandscape printing mode.
    • getPaperSize

      PaperSize getPaperSize()
      Gets the size of the paper.
    • setPaperSize

      void setPaperSize(PaperSize value)
      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

      void setPrintArea(String value)
      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

      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.
    • 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

      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.
    • 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

      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.
    • 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

      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.
    • 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

      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. 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

      void setPrintComments(PrintLocation value)
      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

      void setPrintErrors(PrintErrors value)
      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 a IGraphic object that represents the picture for the centersection of the header. Used to set attributes about the picture.
    • getCenterFooterPicture

      IGraphic getCenterFooterPicture()
      Gets a IGraphic object that represents the picture for the centersection of the footer. Used to set attributes about the picture.
    • getLeftHeaderPicture

      IGraphic getLeftHeaderPicture()
      Gets a IGraphic object that represents the picture for the leftsection of the header. Used to set attributes about the picture.
    • getLeftFooterPicture

      IGraphic getLeftFooterPicture()
      Gets a IGraphic object that represents the picture for the leftsection of the footer. Used to set attributes about the picture.
    • getRightHeaderPicture

      IGraphic getRightHeaderPicture()
      Gets a IGraphic object that represents the picture for the rightsection of the header. Used to set attributes of the picture.
    • getRightFooterPicture

      IGraphic getRightFooterPicture()
      Gets a IGraphic object that represents the picture for the rightsection of the footer. Used to set attributes of the picture.
    • getEvenPage

      IPage getEvenPage()
      Gets the alignment of text on the even IPage of a workbook orsection.
    • getFirstPage

      IPage getFirstPage()
      Gets the alignment of text on the first IPage 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

      void fromJson(String json)
      Generate the page setup from the json.
      参数:
      json -
    • toJson

      String toJson()
      Generate the json from page setup.
      返回: