public class HSSFPrintSetup extends Object implements PrintSetup
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;
A3_PAPERSIZE, A4_EXTRA_PAPERSIZE, A4_PAPERSIZE, A4_PLUS_PAPERSIZE, A4_ROTATED_PAPERSIZE, A4_SMALL_PAPERSIZE, A4_TRANSVERSE_PAPERSIZE, A5_PAPERSIZE, B4_PAPERSIZE, B5_PAPERSIZE, ELEVEN_BY_SEVENTEEN_PAPERSIZE, ENVELOPE_10_PAPERSIZE, ENVELOPE_9_PAPERSIZE, ENVELOPE_C3_PAPERSIZE, ENVELOPE_C4_PAPERSIZE, ENVELOPE_C5_PAPERSIZE, ENVELOPE_C6_PAPERSIZE, ENVELOPE_CS_PAPERSIZE, ENVELOPE_DL_PAPERSIZE, ENVELOPE_MONARCH_PAPERSIZE, EXECUTIVE_PAPERSIZE, FOLIO8_PAPERSIZE, LEDGER_PAPERSIZE, LEGAL_PAPERSIZE, LETTER_PAPERSIZE, LETTER_ROTATED_PAPERSIZE, LETTER_SMALL_PAGESIZE, NOTE8_PAPERSIZE, QUARTO_PAPERSIZE, STATEMENT_PAPERSIZE, TABLOID_PAPERSIZE, TEN_BY_FOURTEEN_PAPERSIZE
Modifier | Constructor and Description |
---|---|
protected |
HSSFPrintSetup(PrintSetupRecord printSetupRecord)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getCommentsMode()
Returns how to print comments:
0: None
1: As displayed on sheet
2: print at the end of sheet
|
short |
getCopies()
Returns the number of copies.
|
boolean |
getDraft()
Returns the draft mode.
|
int |
getErrorsMode()
Returns how to print errors in cell:
0: as displayed on sheet
1: print error as blank
2: print error as dashes("--")
3: print error as "#N/A"
|
short |
getFitHeight()
Returns the number of pages high to fit the sheet in.
|
short |
getFitWidth()
Returns the number of pages wide to fit sheet in.
|
double |
getFooterMargin()
Returns the footer margin.
|
double |
getHeaderMargin()
Returns the header margin.
|
short |
getHResolution()
Returns the horizontal resolution.
|
boolean |
getLandscape()
Returns the landscape mode.
|
boolean |
getLeftToRight()
Returns the left to right print order.
|
boolean |
getNoColor()
Returns the black and white setting.
|
boolean |
getNoOrientation()
Returns the no orientation.
|
boolean |
getNotes()
Returns the print notes.
|
short |
getOptions()
Returns the bit flags for the options.
|
short |
getPageStart()
Returns the page start.
|
short |
getPaperSize()
Returns the paper size.
|
short |
getScale()
Returns the scale.
|
boolean |
getUsePage()
Returns the use page numbers.
|
boolean |
getValidSettings()
Returns the valid settings.
|
short |
getVResolution()
Returns the vertical resolution.
|
void |
setCommentsMode(int mode) |
void |
setCopies(short copies)
Sets the number of copies.
|
void |
setDraft(boolean d)
Set whether it is in draft mode
|
void |
setErrorsMode(int mode) |
void |
setFitHeight(short height)
Set the number of pages high to fit the sheet in
|
void |
setFitWidth(short width)
Set the number of pages wide to fit the sheet in
|
void |
setFooterMargin(double footermargin)
Sets the footer margin.
|
void |
setHeaderMargin(double headermargin)
Sets the header margin.
|
void |
setHResolution(short resolution)
Sets the horizontal resolution.
|
void |
setLandscape(boolean ls)
Set whether to print in landscape
|
void |
setLeftToRight(boolean ltor)
Set whether to go left to right or top down in ordering
|
void |
setNoColor(boolean mono)
Set whether it is black and white
|
void |
setNoOrientation(boolean orientation)
Set no orientation.
|
void |
setNotes(boolean printnotes)
Print the include notes
|
void |
setOptions(short options)
Sets the options flags.
|
void |
setPageStart(short start)
Set the page numbering start.
|
void |
setPaperSize(short size)
Set the paper size.
|
void |
setScale(short scale)
Set the scale.
|
void |
setUsePage(boolean page)
Set whether to use page start
|
void |
setValidSettings(boolean valid)
Valid settings.
|
void |
setVResolution(short resolution)
Sets the vertical resolution.
|
protected HSSFPrintSetup(PrintSetupRecord printSetupRecord)
printSetupRecord
- the low level print setup recordpublic void setPaperSize(short size)
setPaperSize
in interface PrintSetup
size
- the paper size.public void setScale(short scale)
setScale
in interface PrintSetup
scale
- the scale to usepublic void setPageStart(short start)
setPageStart
in interface PrintSetup
start
- the page numbering startpublic void setFitWidth(short width)
setFitWidth
in interface PrintSetup
width
- the number of pagespublic void setFitHeight(short height)
setFitHeight
in interface PrintSetup
height
- the number of pagespublic void setOptions(short options)
options
- The bit flags for the optionspublic void setLeftToRight(boolean ltor)
setLeftToRight
in interface PrintSetup
ltor
- left to rightpublic void setLandscape(boolean ls)
setLandscape
in interface PrintSetup
ls
- landscapepublic void setValidSettings(boolean valid)
setValidSettings
in interface PrintSetup
valid
- Validpublic void setNoColor(boolean mono)
setNoColor
in interface PrintSetup
mono
- Black and whitepublic void setDraft(boolean d)
setDraft
in interface PrintSetup
d
- draftpublic void setNotes(boolean printnotes)
setNotes
in interface PrintSetup
printnotes
- print the notespublic void setNoOrientation(boolean orientation)
setNoOrientation
in interface PrintSetup
orientation
- Orientation.public void setUsePage(boolean page)
setUsePage
in interface PrintSetup
page
- Use page startpublic void setHResolution(short resolution)
setHResolution
in interface PrintSetup
resolution
- horizontal resolutionpublic void setVResolution(short resolution)
setVResolution
in interface PrintSetup
resolution
- vertical resolutionpublic void setHeaderMargin(double headermargin)
setHeaderMargin
in interface PrintSetup
headermargin
- header marginpublic void setFooterMargin(double footermargin)
setFooterMargin
in interface PrintSetup
footermargin
- footer marginpublic void setCopies(short copies)
setCopies
in interface PrintSetup
copies
- number of copiespublic short getPaperSize()
getPaperSize
in interface PrintSetup
public short getScale()
getScale
in interface PrintSetup
public short getPageStart()
getPageStart
in interface PrintSetup
public short getFitWidth()
getFitWidth
in interface PrintSetup
public short getFitHeight()
getFitHeight
in interface PrintSetup
public short getOptions()
public boolean getLeftToRight()
getLeftToRight
in interface PrintSetup
public boolean getLandscape()
getLandscape
in interface PrintSetup
public boolean getValidSettings()
getValidSettings
in interface PrintSetup
public boolean getNoColor()
getNoColor
in interface PrintSetup
public boolean getDraft()
getDraft
in interface PrintSetup
public boolean getNotes()
getNotes
in interface PrintSetup
public boolean getNoOrientation()
getNoOrientation
in interface PrintSetup
public boolean getUsePage()
getUsePage
in interface PrintSetup
public short getHResolution()
getHResolution
in interface PrintSetup
public short getVResolution()
getVResolution
in interface PrintSetup
public double getHeaderMargin()
getHeaderMargin
in interface PrintSetup
public double getFooterMargin()
getFooterMargin
in interface PrintSetup
public short getCopies()
getCopies
in interface PrintSetup
public int getCommentsMode()
PrintSetup
getCommentsMode
in interface PrintSetup
public void setCommentsMode(int mode)
setCommentsMode
in interface PrintSetup
public int getErrorsMode()
PrintSetup
getErrorsMode
in interface PrintSetup
public void setErrorsMode(int mode)
setErrorsMode
in interface PrintSetup
Copyright © 2020. All rights reserved.