Class HSSFPrintSetup

  • All Implemented Interfaces:
    PrintSetup

    public class HSSFPrintSetup
    extends Object
    implements PrintSetup
    Used to modify the print setup.

    Paper size constants have been added for the ones I have access to. They follow as:
    public static final short PRINTER_DEFAULT_PAPERSIZE = 0;
    public static final short LETTER_PAPERSIZE = 1;
    public static final short LEGAL_PAPERSIZE = 5;
    public static final short EXECUTIVE_PAPERSIZE = 7;
    public static final short A4_PAPERSIZE = 9;
    public static final short A5_PAPERSIZE = 11;
    public static final short ENVELOPE_10_PAPERSIZE = 20;
    public static final short ENVELOPE_DL_PAPERSIZE = 27;
    public static final short ENVELOPE_CS_PAPERSIZE = 28;
    public static final short ENVELOPE_MONARCH_PAPERSIZE = 37;

    • Constructor Detail

      • HSSFPrintSetup

        protected HSSFPrintSetup​(PrintSetupRecord printSetupRecord)
        Constructor. Takes the low level print setup record.
        Parameters:
        printSetupRecord - the low level print setup record
    • Method Detail

      • setPaperSize

        public void setPaperSize​(short size)
        Set the paper size.
        Specified by:
        setPaperSize in interface PrintSetup
        Parameters:
        size - the paper size.
      • setScale

        public void setScale​(short scale)
        Set the scale.
        Specified by:
        setScale in interface PrintSetup
        Parameters:
        scale - the scale to use
      • setPageStart

        public void setPageStart​(short start)
        Set the page numbering start.
        Specified by:
        setPageStart in interface PrintSetup
        Parameters:
        start - the page numbering start
      • setFitWidth

        public void setFitWidth​(short width)
        Set the number of pages wide to fit the sheet in
        Specified by:
        setFitWidth in interface PrintSetup
        Parameters:
        width - the number of pages
      • setFitHeight

        public void setFitHeight​(short height)
        Set the number of pages high to fit the sheet in
        Specified by:
        setFitHeight in interface PrintSetup
        Parameters:
        height - the number of pages
      • setOptions

        public void setOptions​(short options)
        Sets the options flags. Not advisable to do it directly.
        Parameters:
        options - The bit flags for the options
      • setLeftToRight

        public void setLeftToRight​(boolean ltor)
        Set whether to go left to right or top down in ordering
        Specified by:
        setLeftToRight in interface PrintSetup
        Parameters:
        ltor - left to right
      • setLandscape

        public void setLandscape​(boolean ls)
        Set whether to print in landscape
        Specified by:
        setLandscape in interface PrintSetup
        Parameters:
        ls - landscape
      • setValidSettings

        public void setValidSettings​(boolean valid)
        Valid settings. I'm not for sure.
        Specified by:
        setValidSettings in interface PrintSetup
        Parameters:
        valid - Valid
      • setNoColor

        public void setNoColor​(boolean mono)
        Set whether it is black and white
        Specified by:
        setNoColor in interface PrintSetup
        Parameters:
        mono - Black and white
      • setDraft

        public void setDraft​(boolean d)
        Set whether it is in draft mode
        Specified by:
        setDraft in interface PrintSetup
        Parameters:
        d - draft
      • setNotes

        public void setNotes​(boolean printnotes)
        Print the include notes
        Specified by:
        setNotes in interface PrintSetup
        Parameters:
        printnotes - print the notes
      • setNoOrientation

        public void setNoOrientation​(boolean orientation)
        Set no orientation. ?
        Specified by:
        setNoOrientation in interface PrintSetup
        Parameters:
        orientation - Orientation.
      • setUsePage

        public void setUsePage​(boolean page)
        Set whether to use page start
        Specified by:
        setUsePage in interface PrintSetup
        Parameters:
        page - Use page start
      • setHResolution

        public void setHResolution​(short resolution)
        Sets the horizontal resolution.
        Specified by:
        setHResolution in interface PrintSetup
        Parameters:
        resolution - horizontal resolution
      • setVResolution

        public void setVResolution​(short resolution)
        Sets the vertical resolution.
        Specified by:
        setVResolution in interface PrintSetup
        Parameters:
        resolution - vertical resolution
      • setHeaderMargin

        public void setHeaderMargin​(double headermargin)
        Sets the header margin.
        Specified by:
        setHeaderMargin in interface PrintSetup
        Parameters:
        headermargin - header margin
      • setFooterMargin

        public void setFooterMargin​(double footermargin)
        Sets the footer margin.
        Specified by:
        setFooterMargin in interface PrintSetup
        Parameters:
        footermargin - footer margin
      • setCopies

        public void setCopies​(short copies)
        Sets the number of copies.
        Specified by:
        setCopies in interface PrintSetup
        Parameters:
        copies - number of copies
      • getPaperSize

        public short getPaperSize()
        Returns the paper size.
        Specified by:
        getPaperSize in interface PrintSetup
        Returns:
        paper size
      • getScale

        public short getScale()
        Returns the scale.
        Specified by:
        getScale in interface PrintSetup
        Returns:
        scale
      • getPageStart

        public short getPageStart()
        Returns the page start.
        Specified by:
        getPageStart in interface PrintSetup
        Returns:
        page start
      • getFitWidth

        public short getFitWidth()
        Returns the number of pages wide to fit sheet in.
        Specified by:
        getFitWidth in interface PrintSetup
        Returns:
        number of pages wide to fit sheet in
      • getFitHeight

        public short getFitHeight()
        Returns the number of pages high to fit the sheet in.
        Specified by:
        getFitHeight in interface PrintSetup
        Returns:
        number of pages high to fit the sheet in
      • getOptions

        public short getOptions()
        Returns the bit flags for the options.
        Returns:
        bit flags for the options
      • getLeftToRight

        public boolean getLeftToRight()
        Returns the left to right print order.
        Specified by:
        getLeftToRight in interface PrintSetup
        Returns:
        left to right print order
      • getLandscape

        public boolean getLandscape()
        Returns the landscape mode.
        Specified by:
        getLandscape in interface PrintSetup
        Returns:
        landscape mode
      • getValidSettings

        public boolean getValidSettings()
        Returns the valid settings.
        Specified by:
        getValidSettings in interface PrintSetup
        Returns:
        valid settings
      • getNoColor

        public boolean getNoColor()
        Returns the black and white setting.
        Specified by:
        getNoColor in interface PrintSetup
        Returns:
        black and white setting
      • getDraft

        public boolean getDraft()
        Returns the draft mode.
        Specified by:
        getDraft in interface PrintSetup
        Returns:
        draft mode
      • getNotes

        public boolean getNotes()
        Returns the print notes.
        Specified by:
        getNotes in interface PrintSetup
        Returns:
        print notes
      • getNoOrientation

        public boolean getNoOrientation()
        Returns the no orientation.
        Specified by:
        getNoOrientation in interface PrintSetup
        Returns:
        no orientation
      • getUsePage

        public boolean getUsePage()
        Returns the use page numbers.
        Specified by:
        getUsePage in interface PrintSetup
        Returns:
        use page numbers
      • getHResolution

        public short getHResolution()
        Returns the horizontal resolution.
        Specified by:
        getHResolution in interface PrintSetup
        Returns:
        horizontal resolution
      • getVResolution

        public short getVResolution()
        Returns the vertical resolution.
        Specified by:
        getVResolution in interface PrintSetup
        Returns:
        vertical resolution
      • getHeaderMargin

        public double getHeaderMargin()
        Returns the header margin.
        Specified by:
        getHeaderMargin in interface PrintSetup
        Returns:
        header margin
      • getFooterMargin

        public double getFooterMargin()
        Returns the footer margin.
        Specified by:
        getFooterMargin in interface PrintSetup
        Returns:
        footer margin
      • getCopies

        public short getCopies()
        Returns the number of copies.
        Specified by:
        getCopies in interface PrintSetup
        Returns:
        number of copies
      • getCommentsMode

        public int getCommentsMode()
        Since:
        3.9.5
      • setCommentsMode

        public void setCommentsMode​(int mode)
        Since:
        3.9.5
      • getErrorsMode

        public int getErrorsMode()
        Since:
        3.9.5
      • setErrorsMode

        public void setErrorsMode​(int mode)
        Since:
        3.9.5