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

public final Class PDFMerger

extends Object
implements Callable<Integer>
Class Inheritance
All Implemented Interfaces
java.util.concurrent.Callable
Annotations
@Command
name:merge
header:Merges multiple PDF documents into one
versionProvider:Version
mixinStandardHelpOptions:true
Imports
java.io.File, .IOException, .PrintStream, java.util.concurrent.Callable, org.apache.pdfbox.io.IOUtils, org.apache.pdfbox.multipdf.PDFMergerUtility, picocli.CommandLine, .CommandLine.Command, .CommandLine.Option

This is the main program that will take a list of pdf documents and merge them, saving the result in a new document.
Author
Ben Litchfield

Field Summary

Modifier and TypeField and Description
private File[]
private File
private final PrintStream

Constructor Summary

AccessConstructor and Description
public
PDFMerger()

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 at least 3.
args
)

Infamous main method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

infilesback to summary
private File[] infiles
Annotations
@Option
names:-i, --input
description:the PDF files to merge.
paramLabel:
required:true
outfileback to summary
private File outfile
Annotations
@Option
names:-o, --output
description:the merged PDF file.
required:true
SYSERRback to summary
private final PrintStream SYSERR
Annotations
@SuppressWarnings:squid:S106

Constructor Detail

PDFMergerback to summary
public PDFMerger()

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 at least 3.