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

public final Class OverlayPDF

extends Object
implements Callable<Integer>
Class Inheritance
All Implemented Interfaces
java.util.concurrent.Callable
Annotations
@Command
name:overlaypdf
header:Adds an overlay to a PDF document
versionProvider:Version
mixinStandardHelpOptions:true
Imports
java.io.File, .IOException, .PrintStream, java.util.HashMap, .Map, java.util.concurrent.Callable, org.apache.pdfbox.multipdf.Overlay, .Overlay.Position, org.apache.pdfbox.pdmodel.PDDocument, picocli.CommandLine, .CommandLine.Command, .CommandLine.Option

Adds an overlay to an existing PDF document. Based on code contributed by Balazs Jerk.

Field Summary

Modifier and TypeField and Description
private File
private File
private File
private File
private File
private File
private File
private Overlay.Position
pack-priv Map<Integer, String>
private final PrintStream
private File

Constructor Summary

AccessConstructor and Description
public
OverlayPDF()

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(final String[]
command line arguments
args
)

This will overlay a document and write out the results.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultOverlayback to summary
private File defaultOverlay
Annotations
@Option
names:-default
description:the default overlay file
evenPageOverlayback to summary
private File evenPageOverlay
Annotations
@Option
names:-even
description:overlay file used for even pages
firstPageOverlayback to summary
private File firstPageOverlay
Annotations
@Option
names:-first
description:overlay file used for the first page
infileback to summary
private File infile
Annotations
@Option
names:-i, --input
description:the PDF input file
required:true
lastPageOverlayback to summary
private File lastPageOverlay
Annotations
@Option
names:-last
description:overlay file used for the last page
oddPageOverlayback to summary
private File oddPageOverlay
Annotations
@Option
names:-odd
description:overlay file used for odd pages
outfileback to summary
private File outfile
Annotations
@Option
names:-o, --output
description:the PDF output file
required:true
positionback to summary
private Overlay.Position position
Annotations
@Option
names:-position
description:where to put the overlay file: FOREGROUND or BACKGROUND (default: ${DEFAULT-VALUE})
specificPageOverlayFileback to summary
pack-priv Map<Integer, String> specificPageOverlayFile
Annotations
@Option
names:-page
description:overlay file used for the given page number, may occur more than once
SYSERRback to summary
private final PrintStream SYSERR
Annotations
@SuppressWarnings:squid:S106
useAllPagesback to summary
private File useAllPages
Annotations
@Option
names:-useAllPages
description:overlay file used for overlay, all pages are used by simply repeating them

Constructor Detail

OverlayPDFback to summary
public OverlayPDF()

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

Annotations
@Override
mainback to summary
public static void main(final String[] args)

This will overlay a document and write out the results.

Parameters
args:String[]

command line arguments