public class SplitProcessor 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.
document, log
Constructor and Description |
---|
SplitProcessor(Document document)
有参构造
|
Modifier and Type | Method and Description |
---|---|
protected void |
saveTarget(PDDocument target,
OutputStream outputStream)
保存任务
|
void |
split(OutputStream outputStream,
int... pageIndexes)
拆分文档
|
void |
split(OutputStream outputStream,
List<Integer> pageIndexes)
拆分文档
|
void |
split(String outputPath,
int... pageIndexes)
拆分文档
|
void |
splitAll(String directory)
拆分全部(单页拆分为独立文档)
|
protected List<Integer> |
toIntegerList(int[] array)
转为整形列表
|
getDocument
public SplitProcessor(Document document)
document
- 文档public void split(String outputPath, int... pageIndexes)
outputPath
- 输出路径pageIndexes
- 页面索引public void split(OutputStream outputStream, int... pageIndexes)
outputStream
- 输出流pageIndexes
- 页面索引public void split(OutputStream outputStream, List<Integer> pageIndexes)
outputStream
- 输出流pageIndexes
- 页面索引public void splitAll(String directory)
directory
- 目录protected void saveTarget(PDDocument target, OutputStream outputStream)
target
- 任务文档outputStream
- 输出流Copyright © 2024. All rights reserved.