Top Description Fields Constructors Methods
org.apache.pdfbox.tools

public final Class PDFSplit

extends Object
implements Callable<Integer>
Class Inheritance
All Implemented Interfaces
java.util.concurrent.Callable
Annotations
@Command
name:pdfsplit
header:Splits a PDF document into number of new documents
versionProvider:Version
mixinStandardHelpOptions:true
Imports
java.io.File, .IOException, .PrintStream, java.util.List, java.util.concurrent.Callable, org.apache.commons.io.FilenameUtils, org.apache.pdfbox.Loader, org.apache.pdfbox.io.IOUtils, org.apache.pdfbox.multipdf.Splitter, org.apache.pdfbox.pdmodel.PDDocument, picocli.CommandLine, .CommandLine.Command, .CommandLine.Option

This is the main program that will take a pdf document and split it into a number of other documents.
Author
Ben Litchfield

Field Summary

Modifier and TypeField and Description
private int
private File
private String
private String
private int
private int
private final PrintStream

Constructor Summary

AccessConstructor and Description
public
PDFSplit()

Constructor.

Method Summary

Modifier and TypeMethod and Description
public Integer
call()

Implements java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.

public static void
main(String[]
Command line arguments, should be one and a reference to a file.
args
)

Infamous main method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

endPageback to summary
private int endPage
Annotations
@Option
names:-endPage
description:end page.
infileback to summary
private File infile
Annotations
@Option
names:-i, --input
description:the PDF file to split
required:true
outputPrefixback to summary
private String outputPrefix
Annotations
@Option
names:-outputPrefix
description:the filename prefix for split files.
passwordback to summary
private String password
Annotations
@Option
names:-password
description:the password to decrypt the document.
arity:0..1
interactive:true
splitback to summary
private int split
Annotations
@Option
names:-split
description:split after this many pages (default 1, if startPage and endPage are unset).
startPageback to summary
private int startPage
Annotations
@Option
names:-startPage
description:start page.
SYSERRback to summary
private final PrintStream SYSERR
Annotations
@SuppressWarnings:squid:S106

Constructor Detail

PDFSplitback to summary
public PDFSplit()

Constructor.

Method Detail

callback to summary
public Integer call()

Implements java.util.concurrent.Callable.call.

Doc from java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.

Returns:Integer

computed result

mainback to summary
public static void main(String[] args)

Infamous main method.

Parameters
args:String[]

Command line arguments, should be one and a reference to a file.