Package loci.poi.hssf.usermodel
Class HSSFPrintSetup
java.lang.Object
loci.poi.hssf.usermodel.HSSFPrintSetup
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 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;
- Author:
- Shawn Laubach (slaubach at apache dot org)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final short -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHSSFPrintSetup(PrintSetupRecord printSetupRecord) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionshortReturns the number of copies.booleangetDraft()Returns the draft mode.shortReturns the number of pages high to fit the sheet in.shortReturns the number of pages wide to fit sheet in.doubleReturns the footer margin.doubleReturns the header margin.shortReturns the horizontal resolution.booleanReturns the landscape mode.booleanReturns the left to right print order.booleanReturns the black and white setting.booleanReturns the no orientation.booleangetNotes()Returns the print notes.shortReturns the bit flags for the options.shortReturns the page start.shortReturns the paper size.shortgetScale()Returns the scale.booleanReturns the use page numbers.booleanReturns the valid settings.shortReturns the vertical resolution.voidsetCopies(short copies) Sets the number of copies.voidsetDraft(boolean d) Set whether it is in draft modevoidsetFitHeight(short height) Set the number of pages high to fit the sheet invoidsetFitWidth(short width) Set the number of pages wide to fit the sheet invoidsetFooterMargin(double footermargin) Sets the footer margin.voidsetHeaderMargin(double headermargin) Sets the header margin.voidsetHResolution(short resolution) Sets the horizontal resolution.voidsetLandscape(boolean ls) Set whether to print in landscapevoidsetLeftToRight(boolean ltor) Set whether to go left to right or top down in orderingvoidsetNoColor(boolean mono) Set whether it is black and whitevoidsetNoOrientation(boolean orientation) Set no orientation.voidsetNotes(boolean printnotes) Print the include notesvoidsetOptions(short options) Sets the options flags.voidsetPageStart(short start) Set the page numbering start.voidsetPaperSize(short size) Set the paper size.voidsetScale(short scale) Set the scale.voidsetUsePage(boolean page) Set whether to use page startvoidsetValidSettings(boolean valid) Valid settings.voidsetVResolution(short resolution) Sets the vertical resolution.
-
Field Details
-
LETTER_PAPERSIZE
public static final short LETTER_PAPERSIZE- See Also:
-
LEGAL_PAPERSIZE
public static final short LEGAL_PAPERSIZE- See Also:
-
EXECUTIVE_PAPERSIZE
public static final short EXECUTIVE_PAPERSIZE- See Also:
-
A4_PAPERSIZE
public static final short A4_PAPERSIZE- See Also:
-
A5_PAPERSIZE
public static final short A5_PAPERSIZE- See Also:
-
ENVELOPE_10_PAPERSIZE
public static final short ENVELOPE_10_PAPERSIZE- See Also:
-
ENVELOPE_DL_PAPERSIZE
public static final short ENVELOPE_DL_PAPERSIZE- See Also:
-
ENVELOPE_CS_PAPERSIZE
public static final short ENVELOPE_CS_PAPERSIZE- See Also:
-
ENVELOPE_MONARCH_PAPERSIZE
public static final short ENVELOPE_MONARCH_PAPERSIZE- See Also:
-
-
Constructor Details
-
HSSFPrintSetup
Constructor. Takes the low level print setup record.- Parameters:
printSetupRecord- the low level print setup record
-
-
Method Details
-
setPaperSize
public void setPaperSize(short size) Set the paper size.- Parameters:
size- the paper size.
-
setScale
public void setScale(short scale) Set the scale.- Parameters:
scale- the scale to use
-
setPageStart
public void setPageStart(short start) Set the page numbering start.- Parameters:
start- the page numbering start
-
setFitWidth
public void setFitWidth(short width) Set the number of pages wide to fit the sheet in- Parameters:
width- the number of pages
-
setFitHeight
public void setFitHeight(short height) Set the number of pages high to fit the sheet in- 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- Parameters:
ltor- left to right
-
setLandscape
public void setLandscape(boolean ls) Set whether to print in landscape- Parameters:
ls- landscape
-
setValidSettings
public void setValidSettings(boolean valid) Valid settings. I'm not for sure.- Parameters:
valid- Valid
-
setNoColor
public void setNoColor(boolean mono) Set whether it is black and white- Parameters:
mono- Black and white
-
setDraft
public void setDraft(boolean d) Set whether it is in draft mode- Parameters:
d- draft
-
setNotes
public void setNotes(boolean printnotes) Print the include notes- Parameters:
printnotes- print the notes
-
setNoOrientation
public void setNoOrientation(boolean orientation) Set no orientation. ?- Parameters:
orientation- Orientation.
-
setUsePage
public void setUsePage(boolean page) Set whether to use page start- Parameters:
page- Use page start
-
setHResolution
public void setHResolution(short resolution) Sets the horizontal resolution.- Parameters:
resolution- horizontal resolution
-
setVResolution
public void setVResolution(short resolution) Sets the vertical resolution.- Parameters:
resolution- vertical resolution
-
setHeaderMargin
public void setHeaderMargin(double headermargin) Sets the header margin.- Parameters:
headermargin- header margin
-
setCopies
public void setCopies(short copies) Sets the number of copies.- Parameters:
copies- number of copies
-
getPaperSize
public short getPaperSize()Returns the paper size.- Returns:
- paper size
-
getScale
public short getScale()Returns the scale.- Returns:
- scale
-
getPageStart
public short getPageStart()Returns the page start.- Returns:
- page start
-
getFitWidth
public short getFitWidth()Returns the number of pages wide to fit sheet in.- Returns:
- number of pages wide to fit sheet in
-
getFitHeight
public short getFitHeight()Returns the number of pages high to fit the sheet in.- 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.- Returns:
- left to right print order
-
getLandscape
public boolean getLandscape()Returns the landscape mode.- Returns:
- landscape mode
-
getValidSettings
public boolean getValidSettings()Returns the valid settings.- Returns:
- valid settings
-
getNoColor
public boolean getNoColor()Returns the black and white setting.- Returns:
- black and white setting
-
getDraft
public boolean getDraft()Returns the draft mode.- Returns:
- draft mode
-
getNotes
public boolean getNotes()Returns the print notes.- Returns:
- print notes
-
getNoOrientation
public boolean getNoOrientation()Returns the no orientation.- Returns:
- no orientation
-
getUsePage
public boolean getUsePage()Returns the use page numbers.- Returns:
- use page numbers
-
getHResolution
public short getHResolution()Returns the horizontal resolution.- Returns:
- horizontal resolution
-
getVResolution
public short getVResolution()Returns the vertical resolution.- Returns:
- vertical resolution
-
getHeaderMargin
public double getHeaderMargin()Returns the header margin.- Returns:
- header margin
-
getCopies
public short getCopies()Returns the number of copies.- Returns:
- number of copies
-