public class PrintStream extends Object
Constructor and Description |
---|
PrintStream(org.apache.poi.ss.usermodel.Sheet sheet) |
Modifier and Type | Method and Description |
---|---|
PrintStream |
autoLimit()
sheet页行数自适应
|
PrintStream |
autoLimit(boolean auto)
sheet页行数自适应
|
PrintStream |
bottomMargin(double margin)
设置下边距 英寸
|
PrintStream |
color()
打印彩色纸张
|
PrintStream |
color(boolean color)
打印彩色纸张
|
PrintStream |
copies(int i)
打印份数
|
PrintStream |
draft()
使用草稿模式
|
PrintStream |
draft(boolean use)
使用草稿模式
|
PrintStream |
fit()
sheet页自适应
|
PrintStream |
fit(boolean fit)
打印自适应
|
PrintStream |
footerMargin(double margin)
设置页脚边距 英寸
|
double |
getBottomMargin()
获取下边距 英寸
|
int |
getCopies()
获取打印份数
|
int |
getHeight()
获取高度
|
int |
getHorizontalResolution()
获取水平分辨率
|
double |
getLeftMargin()
获取左边距 英寸
|
double |
getMargin(ExcelMarginType type)
获取边距 英寸
|
double |
getMargin(int type)
获取边距 英寸
|
int |
getOrientation()
获取打印方向
|
int |
getPageStart()
获取起始页码
|
int |
getPaper()
获取纸张大小
|
int |
getPrintOrder()
获取打印顺序
|
org.apache.poi.ss.usermodel.PrintSetup |
getPrintSetup() |
int[] |
getRepeat()
重复打印的行和列
0 rowStartIndex
* 1 rowEndIndex
* 2 columnStartIndex
* 3 columnEndIndex
|
double |
getRightMargin()
获取右边距 英寸
|
int |
getScale()
获取缩放比例
|
org.apache.poi.ss.usermodel.Sheet |
getSheet() |
double |
getTopMargin()
获取上边距 英寸
|
boolean |
getUsePage()
是否使用起始页码
|
int |
getVerticalResolution()
获取垂直分辨率
|
int |
getWidth()
获取宽度
|
PrintStream |
headerMargin(double margin)
设置页眉边距 英寸
|
PrintStream |
height(int height)
设置页高
|
PrintStream |
horizontallyCenter()
设置页面水平居中
|
PrintStream |
horizontallyCenter(boolean center)
设置页面水平居中
|
PrintStream |
horizontalResolution(int dpi)
水平分辨率
|
boolean |
isAutoLimit()
sheet页行数是否自适应
|
boolean |
isColor()
获取打印颜色是否为彩色
|
boolean |
isDraft()
是否为草稿模式
|
boolean |
isFit()
打印
|
boolean |
isHorizontallyCenter()
sheet页是否水平居中
|
boolean |
isNoColor()
获取打印颜色是否为黑白
|
boolean |
isPrintGridLines()
是否打印网格线
|
boolean |
isPrintHeadings()
是否打印行和列的标题
|
boolean |
isPrintNotes()
是否打印批注
|
boolean |
isValid()
获取配置是否合法
|
boolean |
isVerticallyCenter()
sheet页是否垂直居中
|
PrintStream |
landScapePrint()
横向打印
|
PrintStream |
landScapePrint(boolean landScape)
横向打印
|
PrintStream |
leftMargin(double margin)
设置左边距 英寸
|
PrintStream |
leftToRightOrder()
设置顺序为从左往右
|
PrintStream |
leftToRightOrder(boolean left)
设置顺序为从左往右
|
PrintStream |
limit(int limit)
每页行数
|
PrintStream |
margin(ExcelMarginType type,
double margin)
设置边距 英寸
|
PrintStream |
margin(short type,
double margin)
设置边距 英寸
|
PrintStream |
noColor()
打印黑白纸张
|
PrintStream |
notes()
打印批注
|
PrintStream |
notes(boolean print)
打印批注
|
PrintStream |
pageStart(int page)
起始页
|
PrintStream |
paper(ExcelPaperType type)
设置纸张大小
|
PrintStream |
paper(int i)
设置纸张大小
|
PrintStream |
paper(org.apache.poi.ss.usermodel.PaperSize s)
设置纸张大小
|
static org.apache.poi.ss.usermodel.PrintSetup |
parsePrint(org.apache.poi.ss.usermodel.Sheet sheet,
PrintOption option)
解析 print
|
PrintStream |
portraitPrint()
纵向打印
|
PrintStream |
portraitPrint(boolean portrait)
纵向打印
|
PrintStream |
printGridLines()
打印网格线
|
PrintStream |
printGridLines(boolean print)
打印网格线
|
PrintStream |
printOrientation(boolean set)
设置打印方向
|
PrintStream |
printRowHeading()
打印行标题和列标题
|
PrintStream |
printRowHeading(boolean print)
打印行标题和列标题
|
PrintStream |
repeat(int[] repeat)
重复打印行和列
0 rowStartIndex
1 rowEndIndex
2 columnStartIndex
3 columnEndIndex
[1, 3] = [0, 1, 0, 3]
|
PrintStream |
repeat(int rowEndIndex,
int columnEndIndex)
重复打印行和列
|
PrintStream |
repeat(int rowStartIndex,
int rowEndIndex,
int columnStartIndex,
int columnEndIndex)
重复打印行和列
|
PrintStream |
rightMargin(double margin)
设置右边距 英寸
|
PrintStream |
scale(int scale)
设置缩放比例 10 - 400
|
PrintStream |
setPrintOrientation()
设置打印方向
|
static PrintStream |
stream(org.apache.poi.ss.usermodel.Sheet sheet) |
PrintStream |
topMargin(double margin)
设置上边距 英寸
|
PrintStream |
topToBottomOrder()
设置顺序为自上而下
|
PrintStream |
topToBottomOrder(boolean top)
设置顺序为自上而下
|
PrintStream |
unAutoLimit()
sheet页行数不自适应
|
PrintStream |
unFit()
打印自适应
|
PrintStream |
unHorizontallyCenter()
不设置页面水平居中
|
PrintStream |
unNotes()
不打印批注
|
PrintStream |
unPrintGridLines()
不打印网格线
|
PrintStream |
unPrintHeading()
打印行标题和列标题
|
PrintStream |
unsetDraft()
不使用草稿模式
|
PrintStream |
unsetPrintOrientation()
不设置打印方向
|
PrintStream |
unUsePage()
不使用起始页
|
PrintStream |
unVerticallyCenter()
不设置页面垂直居中
|
PrintStream |
usePage()
使用起始页
|
PrintStream |
usePage(boolean use)
使用起始页
|
PrintStream |
verticallyCenter()
设置页面垂直居中
|
PrintStream |
verticallyCenter(boolean center)
设置页面垂直居中
|
PrintStream |
verticalResolution(int dpi)
垂直分辨率
|
PrintStream |
width(int width)
设置页宽
|
public static PrintStream stream(org.apache.poi.ss.usermodel.Sheet sheet)
public static org.apache.poi.ss.usermodel.PrintSetup parsePrint(org.apache.poi.ss.usermodel.Sheet sheet, PrintOption option)
sheet
- sheetoption
- optionpublic PrintStream printGridLines()
public PrintStream printGridLines(boolean print)
print
- 是否打印public PrintStream unPrintGridLines()
public PrintStream printRowHeading()
public PrintStream printRowHeading(boolean print)
print
- 是否打印public PrintStream unPrintHeading()
public PrintStream fit()
public PrintStream fit(boolean fit)
auto
- 是否自适应public PrintStream unFit()
public PrintStream autoLimit()
public PrintStream autoLimit(boolean auto)
auto
- 是否自适应public PrintStream unAutoLimit()
public PrintStream limit(int limit)
limit
- 行数public PrintStream horizontallyCenter()
public PrintStream horizontallyCenter(boolean center)
center
- 是否水平居中public PrintStream unHorizontallyCenter()
public PrintStream verticallyCenter()
public PrintStream verticallyCenter(boolean center)
center
- 是否垂直居中public PrintStream unVerticallyCenter()
public PrintStream repeat(int[] repeat)
repeat
- repeatpublic PrintStream repeat(int rowEndIndex, int columnEndIndex)
rowEndIndex
- 结束行索引columnEndIndex
- 结束列索引public PrintStream repeat(int rowStartIndex, int rowEndIndex, int columnStartIndex, int columnEndIndex)
rowStartIndex
- 开始行索引rowEndIndex
- 结束行索引columnStartIndex
- 开始列索引columnEndIndex
- 结束列索引public PrintStream paper(int i)
i
- 纸张大小public PrintStream paper(org.apache.poi.ss.usermodel.PaperSize s)
s
- 纸张大小public PrintStream paper(ExcelPaperType type)
type
- 纸张public PrintStream color()
public PrintStream color(boolean color)
color
- 是否为彩色public PrintStream noColor()
public PrintStream landScapePrint()
public PrintStream landScapePrint(boolean landScape)
landScape
- 是否横向打印public PrintStream portraitPrint()
public PrintStream portraitPrint(boolean portrait)
portrait
- 是否纵向打印public PrintStream printOrientation(boolean set)
set
- 是否设置打印方向public PrintStream setPrintOrientation()
public PrintStream unsetPrintOrientation()
public PrintStream scale(int scale)
scale
- 缩放比例public PrintStream notes()
public PrintStream unNotes()
public PrintStream notes(boolean print)
print
- 是否打印批注public PrintStream horizontalResolution(int dpi)
dpi
- 分辨率public PrintStream verticalResolution(int dpi)
dpi
- 分辨率public PrintStream width(int width)
width
- 页宽public PrintStream height(int height)
height
- 页高public PrintStream leftMargin(double margin)
margin
- 边距public PrintStream rightMargin(double margin)
margin
- 边距public PrintStream topMargin(double margin)
margin
- 边距public PrintStream bottomMargin(double margin)
margin
- 边距public PrintStream headerMargin(double margin)
margin
- 边距public PrintStream footerMargin(double margin)
margin
- 边距public PrintStream margin(ExcelMarginType type, double margin)
type
- 类型margin
- 边距public PrintStream margin(short type, double margin)
type
- 类型 ExcelMarginType
margin
- 边距public PrintStream usePage()
public PrintStream usePage(boolean use)
use
- 是否使用public PrintStream unUsePage()
public PrintStream pageStart(int page)
page
- 起始页public PrintStream copies(int i)
i
- 份数public PrintStream draft()
public PrintStream draft(boolean use)
use
- 是否使用public PrintStream unsetDraft()
public PrintStream leftToRightOrder()
public PrintStream leftToRightOrder(boolean left)
left
- 是否从左到右public PrintStream topToBottomOrder()
public PrintStream topToBottomOrder(boolean top)
top
- 是否自上而下public int getPaper()
public boolean isColor()
public boolean isNoColor()
public int getOrientation()
public int getScale()
public boolean isPrintNotes()
public int getHorizontalResolution()
public int getVerticalResolution()
public int getWidth()
public int getHeight()
public double getLeftMargin()
public double getRightMargin()
public double getTopMargin()
public double getBottomMargin()
public double getMargin(ExcelMarginType type)
type
- typepublic double getMargin(int type)
type
- 类型 ExcelMarginType
public boolean getUsePage()
public int getPageStart()
public int getCopies()
public boolean isDraft()
public int getPrintOrder()
public boolean isValid()
public boolean isAutoLimit()
public boolean isFit()
public boolean isHorizontallyCenter()
public boolean isVerticallyCenter()
public int[] getRepeat()
0 rowStartIndex * 1 rowEndIndex * 2 columnStartIndex * 3 columnEndIndex
public boolean isPrintGridLines()
public boolean isPrintHeadings()
public org.apache.poi.ss.usermodel.Sheet getSheet()
public org.apache.poi.ss.usermodel.PrintSetup getPrintSetup()
Copyright © 2024. All rights reserved.