public class PrintProcessor extends AbstractProcessor
Copyright (c) 2020 xsx All Rights Reserved. x-easypdf-pdfbox is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
PrintProcessor.DefaultPageable
默认打印选项
重写
PDFPageable |
| 限定符和类型 | 字段和说明 |
|---|---|
protected Integer |
beginPageNo
打印起始页码
|
protected Integer |
count
打印数量
|
protected Float |
dpi
打印dpi
|
protected Integer |
endPageNo
打印结束页码
|
protected Boolean |
isCenter
是否居中
|
protected Boolean |
isMemoryOptimization
是否内存优化(可能降低图像质量)
|
protected Boolean |
isShowBorder
是否显示边框
|
protected PrintOrientation |
orientation
打印方向
|
protected RenderingHints |
renderingHints
打印渲染提示
|
protected PrintScaling |
scaling
打印缩放
|
document, log| 构造器和说明 |
|---|
PrintProcessor(Document document)
有参构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
init()
初始化
|
protected PrintProcessor.DefaultPageable |
initPageable()
初始化页面选项
|
protected org.apache.pdfbox.printing.PDFPrintable |
initPrintable()
初始化打印选项
|
void |
print()
打印
|
void |
setBeginPageNo(Integer beginPageNo)
设置起始页码
注:从1开始
|
void |
setEndPageNo(Integer endPageNo)
设置结束页码
|
getDocumentprotected Integer beginPageNo
protected Integer endPageNo
protected PrintScaling scaling
protected PrintOrientation orientation
protected Float dpi
protected RenderingHints renderingHints
protected Boolean isShowBorder
protected Boolean isCenter
protected Boolean isMemoryOptimization
protected Integer count
public PrintProcessor(Document document)
document - 文档public void setBeginPageNo(Integer beginPageNo)
注:从1开始
beginPageNo - 起始页码public void setEndPageNo(Integer endPageNo)
endPageNo - 结束页码public void print()
protected void init()
protected org.apache.pdfbox.printing.PDFPrintable initPrintable()
protected PrintProcessor.DefaultPageable initPageable()
Copyright © 2024. All rights reserved.