Interface SPrintSetup

  • All Known Implementing Classes:
    PrintSetupImpl

    public interface SPrintSetup
    Store various setting for printing.
    Since:
    3.5.0
    Author:
    dennis
    • Method Detail

      • isPrintGridlines

        boolean isPrintGridlines()
      • setPrintGridlines

        void setPrintGridlines​(boolean enable)
      • getHeaderMargin

        double getHeaderMargin()
      • setHeaderMargin

        void setHeaderMargin​(double inches)
      • getFooterMargin

        double getFooterMargin()
      • setFooterMargin

        void setFooterMargin​(double inches)
      • getLeftMargin

        double getLeftMargin()
      • setLeftMargin

        void setLeftMargin​(double inches)
      • getRightMargin

        double getRightMargin()
      • setRightMargin

        void setRightMargin​(double inches)
      • getTopMargin

        double getTopMargin()
      • setTopMargin

        void setTopMargin​(double inches)
      • getBottomMargin

        double getBottomMargin()
      • setBottomMargin

        void setBottomMargin​(double inches)
      • setLandscape

        void setLandscape​(boolean landscape)
        Set true to print in landscape orientation.
        Parameters:
        landscape -
      • isLandscape

        boolean isLandscape()
      • setScale

        void setScale​(int scale)
        Parameters:
        scale - must be between 10 ~ 400 (inclusive).
        Since:
        3.6.0
      • getScale

        int getScale()
      • setHeader

        void setHeader​(SHeader header)
        Set general Header or odd page header.
        Parameters:
        header -
        Since:
        3.6.0
      • setEvenHeader

        void setEvenHeader​(SHeader header)
        Set even page footer; valid only if isDifferentOddEvenPage() is true.
        Parameters:
        header -
        Since:
        3.6.0
      • getEvenHeader

        SHeader getEvenHeader()
      • setFirstHeader

        void setFirstHeader​(SHeader header)
        Set first page footer; valid only if isDifferentFirstPage() is true.
        Parameters:
        header -
        Since:
        3.6.0
      • getFirstHeader

        SHeader getFirstHeader()
      • setFooter

        void setFooter​(SFooter footer)
        Set general footer or odd page footer.
        Parameters:
        footer -
        Since:
        3.6.0
      • setEvenFooter

        void setEvenFooter​(SFooter footer)
        Set even page footer; valid only if isDifferentOddEvenPage() is true.
        Parameters:
        footer -
        Since:
        3.6.0
      • getEvenFooter

        SFooter getEvenFooter()
      • setFirstFooter

        void setFirstFooter​(SFooter footer)
        Set first page footer; valid only if isDifferentFirstPage() is true.
        Parameters:
        footer -
        Since:
        3.6.0
      • getFirstFooter

        SFooter getFirstFooter()
      • setDifferentOddEvenPage

        void setDifferentOddEvenPage​(boolean flag)
        Set true to print even page with special header and footer for even page; {@see #getEvenHeader()} and {@see #getEvenFooter()}.
        Parameters:
        flag -
        Since:
        3.6.0
      • isDifferentOddEvenPage

        boolean isDifferentOddEvenPage()
      • setDifferentFirstPage

        void setDifferentFirstPage​(boolean flag)
        Set true to print first page with special header and footer for first page; {@see #getFirstHeader()} and {@see #getFirstFooter()}.
        Parameters:
        flag -
        Since:
        3.6.0
      • isDifferentFirstPage

        boolean isDifferentFirstPage()
      • setScaleWithDoc

        void setScaleWithDoc​(boolean flag)
        Set true to scale header/footer with document.
        Parameters:
        flag -
        Since:
        3.6.0
      • isScaleWithDoc

        boolean isScaleWithDoc()
      • setAlignWithMargins

        void setAlignWithMargins​(boolean flag)
        Set true to align header/footer with page margins.
        Parameters:
        flag -
        Since:
        3.6.0
      • isAlignWithMargins

        boolean isAlignWithMargins()
      • setHCenter

        void setHCenter​(boolean center)
        Set true to print sheet center horizontally on page.
        Parameters:
        center -
        Since:
        3.6.0
      • isHCenter

        boolean isHCenter()
      • setVCenter

        void setVCenter​(boolean vcenter)
        Set true to print sheet center vertically on page.
        Parameters:
        vcenter -
        Since:
        3.6.0
      • isVCenter

        boolean isVCenter()
      • setPageStart

        void setPageStart​(int start)
        Parameters:
        start -
        Since:
        3.6.0
      • getPageStart

        int getPageStart()
      • setFitWidth

        void setFitWidth​(int numPages)
        Set the number of pages the sheet width is fit to. MUST be less than or equal to 32767. The value 0 means use as many pages as necessary to print the columns in the sheet.
        Since:
        3.6.0
      • getFitWidth

        int getFitWidth()
      • setFitHeight

        void setFitHeight​(int numPages)
        Set the number of pages the sheet height is fit to. MUST be less than or equal to 32767. The value 0 means use as many pages as necessary to print the rows of the sheet.
        Parameters:
        pages -
        Since:
        3.6.0
      • getFitHeight

        int getFitHeight()
      • setPrintArea

        void setPrintArea​(String formula)
        Set the print area as an area formula; e.g. A1:B2
        Parameters:
        formula -
        Since:
        3.6.0
      • getPrintArea

        String getPrintArea()
      • setRepeatingRowsTitle

        void setRepeatingRowsTitle​(int firstRow,
                                   int lastRow)
        Set the first row of the repeat title rows for each top-to-bottom pages.
        Parameters:
        formula -
        Since:
        3.6.0
      • getRepeatingRowsTitle

        CellRegion getRepeatingRowsTitle()
      • setRepeatingColumnsTitle

        void setRepeatingColumnsTitle​(int firstCol,
                                      int lastCol)
        Set the first column of the repeat title columns for each left-to-right pages.
        Parameters:
        formula -
        Since:
        3.6.0
      • getRepeatingColumnsTitle

        CellRegion getRepeatingColumnsTitle()
      • setPrintHeadings

        void setPrintHeadings​(boolean flag)
        Set true to also out row and column headings.
        Parameters:
        flag -
        Since:
        3.6.0
      • isPrintHeadings

        boolean isPrintHeadings()
      • setCommentsMode

        void setCommentsMode​(int mode)
        Set how to print comments: 0: none 1: at end of sheet 2: as displayed on the sheet
        Parameters:
        mode -
        Since:
        3.6.0
      • getCommentsMode

        int getCommentsMode()
      • setErrorPrintMode

        void setErrorPrintMode​(int mode)
        Set how to handle errors in the cell data; 0: print errors as displayed on the sheet 1: print errors as blank 2: print errors as dashes ("--") 3: print errors as "#N/A".
        Parameters:
        mode -
        Since:
        3.6.0
      • getErrorPrintMode

        int getErrorPrintMode()
      • setLeftToRight

        void setLeftToRight​(boolean flag)
        Set true to output multiple pages in the order of left-to-right first and then top-to-bottom; false in the order of top-to-bottom first and then left-to-right.
        Parameters:
        flag -
        Since:
        3.6.0
      • isLeftToRight

        boolean isLeftToRight()