public class HSSFPrintSetup extends java.lang.Object implements PrintSetup
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;
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, PRINTER_DEFAULT_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 |
---|---|
short |
getCopies()
Returns the number of copies.
(返回份数。)
|
boolean |
getDraft()
Returns the draft mode.
(返回草稿模式。)
|
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 |
setCopies(short copies)
Sets the number of copies.
(设置份数。)
|
void |
setDraft(boolean d)
Set whether it is in draft 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 record
(printSetupRecord - 低级打印设置记录)
public void setPaperSize(short size)
setPaperSize
in interface
PrintSetup
(接口 PrintSetup 中的 setPaperSize)
size
- the paper size.
(size - 纸张大小。)
public void setScale(short scale)
setScale
in interface
PrintSetup
(接口 PrintSetup 中的 setScale)
scale
- the scale to use
(scale - 要使用的比例)
public void setPageStart(short start)
setPageStart
in interface
PrintSetup
(接口 PrintSetup 中的 setPageStart)
start
- the page numbering start
(start - 页码开始)
public void setFitWidth(short width)
setFitWidth
in interface
PrintSetup
(接口 PrintSetup 中的 setFitWidth)
width
- the number of pages
(宽度 - 页数)
public void setFitHeight(short height)
setFitHeight
in interface
PrintSetup
(接口 PrintSetup 中的 setFitHeight)
height
- the number of pages
(高度 - 页数)
public void setOptions(short options)
options
- The bit flags for the options
(options - 选项的位标志)
public void setLeftToRight(boolean ltor)
setLeftToRight
in interface
PrintSetup
(接口 PrintSetup 中的 setLeftToRight)
ltor
- left to right
(ltor - 从左到右)
public void setLandscape(boolean ls)
setLandscape
in interface
PrintSetup
(PrintSetup 界面中的 setLandscape)
ls
- landscape
(ls - 风景)
public void setValidSettings(boolean valid)
setValidSettings
in interface
PrintSetup
(接口 PrintSetup 中的 setValidSettings)
valid
- Valid
(有效 - 有效)
public void setNoColor(boolean mono)
setNoColor
in interface
PrintSetup
(接口 PrintSetup 中的 setNoColor)
mono
- Black and white
(单色 - 黑白)
public void setDraft(boolean d)
setDraft
in interface
PrintSetup
(接口 PrintSetup 中的 setDraft)
d
- draft
(d - 草稿)
public void setNotes(boolean printnotes)
setNotes
in interface
PrintSetup
(接口 PrintSetup 中的 setNotes)
printnotes
- print the notes
(printnotes - 打印笔记)
public void setNoOrientation(boolean orientation)
setNoOrientation
in interface
PrintSetup
(接口 PrintSetup 中的 setNoOrientation)
orientation
- Orientation.
(方向 - 方向。)
public void setUsePage(boolean page)
setUsePage
in interface
PrintSetup
(接口 PrintSetup 中的 setUsePage)
page
- Use page start
(page - 使用页面开始)
public void setHResolution(short resolution)
setHResolution
in interface
PrintSetup
(PrintSetup 界面中的 setHResolution)
resolution
- horizontal resolution
(分辨率 - 水平分辨率)
public void setVResolution(short resolution)
setVResolution
in interface
PrintSetup
(接口 PrintSetup 中的 setVResolution)
resolution
- vertical resolution
(分辨率 - 垂直分辨率)
public void setHeaderMargin(double headermargin)
setHeaderMargin
in interface
PrintSetup
(接口 PrintSetup 中的 setHeaderMargin)
headermargin
- header margin
(headermargin - 标题页边距)
public void setFooterMargin(double footermargin)
setFooterMargin
in interface
PrintSetup
(接口 PrintSetup 中的 setFooterMargin)
footermargin
- footer margin
(footermargin - 页脚边距)
public void setCopies(short copies)
setCopies
in interface
PrintSetup
(接口 PrintSetup 中的 setCopies)
copies
- number of copies
(份数 - 份数)
public short getPaperSize()
getPaperSize
in interface
PrintSetup
(接口 PrintSetup 中的 getPaperSize)
public short getScale()
getScale
in interface
PrintSetup
(接口 PrintSetup 中的 getScale)
public short getPageStart()
getPageStart
in interface
PrintSetup
(接口 PrintSetup 中的 getPageStart)
public short getFitWidth()
getFitWidth
in interface
PrintSetup
(接口 PrintSetup 中的 getFitWidth)
public short getFitHeight()
getFitHeight
in interface
PrintSetup
(接口 PrintSetup 中的 getFitHeight)
public short getOptions()
public boolean getLeftToRight()
getLeftToRight
in interface
PrintSetup
(接口 PrintSetup 中的 getLeftToRight)
public boolean getLandscape()
getLandscape
in interface
PrintSetup
(接口 PrintSetup 中的 getLandscape)
public boolean getValidSettings()
getValidSettings
in interface
PrintSetup
(接口 PrintSetup 中的 getValidSettings)
public boolean getNoColor()
getNoColor
in interface
PrintSetup
(接口 PrintSetup 中的 getNoColor)
public boolean getDraft()
getDraft
in interface
PrintSetup
(接口 PrintSetup 中的 getDraft)
public boolean getNotes()
getNotes
in interface
PrintSetup
(接口 PrintSetup 中的 getNotes)
public boolean getNoOrientation()
getNoOrientation
in interface
PrintSetup
(接口 PrintSetup 中的 getNoOrientation)
public boolean getUsePage()
getUsePage
in interface
PrintSetup
(接口 PrintSetup 中的 getUsePage)
public short getHResolution()
getHResolution
in interface
PrintSetup
(接口 PrintSetup 中的 getHResolution)
public short getVResolution()
getVResolution
in interface
PrintSetup
(接口 PrintSetup 中的 getVResolution)
public double getHeaderMargin()
getHeaderMargin
in interface
PrintSetup
(接口 PrintSetup 中的 getHeaderMargin)
public double getFooterMargin()
getFooterMargin
in interface
PrintSetup
(接口 PrintSetup 中的 getFooterMargin)
public short getCopies()
getCopies
in interface
PrintSetup
(接口 PrintSetup 中的 getCopies)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.