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

public Class ExtractXMP

extends Object
implements Callable<Integer>
Class Inheritance
All Implemented Interfaces
java.util.concurrent.Callable
Annotations
@Command
name:extractxmp
header:Extracts the xmp stream from a PDF document
versionProvider:Version
mixinStandardHelpOptions:true
Imports
java.io.File, .IOException, .PrintStream, java.util.concurrent.Callable, org.apache.commons.io.FilenameUtils, org.apache.pdfbox.Loader, org.apache.pdfbox.pdmodel.PDDocument, .PDDocumentCatalog, org.apache.pdfbox.pdmodel.common.PDMetadata, picocli.CommandLine

Extract the XMP metadata from the document or from a page.
Author
Tilman Hausherr

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
ExtractXMP()

Constructor.

Method Summary

Modifier and TypeMethod and Description
public Integer
call()

Implements java.util.concurrent.Callable.call.

Starts the xmp extraction.

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

infileback to summary
private File infile
Annotations
@Option
names:-i, --input
description:the PDF file
required:true
outfileback to summary
private File outfile
Annotations
@Option
names:-o, --output
description:the exported text file
pageback to summary
private int page
Annotations
@Option
names:-page
description:extract the XMP information from a specific page (1 based)
passwordback to summary
private String password
Annotations
@Option
names:-password
description:the password for the PDF or certificate in keystore.
arity:0..1
interactive:true
SYSERRback to summary
private final PrintStream SYSERR
Annotations
@SuppressWarnings:squid:S106
SYSOUTback to summary
private final PrintStream SYSOUT
Annotations
@SuppressWarnings:squid:S106
toConsoleback to summary
private boolean toConsole
Annotations
@Option
names:-console
description:Send text to console instead of file

Constructor Detail

ExtractXMPback to summary
private ExtractXMP()

Constructor.

Method Detail

callback to summary
public Integer call()

Implements java.util.concurrent.Callable.call.

Starts the xmp extraction.

Returns:Integer

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

computed result

Annotations
@Override
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.