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

public final Class DecompressObjectstreams

extends Object
implements Callable<Integer>
Class Inheritance
All Implemented Interfaces
java.util.concurrent.Callable
Annotations
@Command
name:DecompressObjectstreams
header:Decompresses object streams in a PDF file.
Imports
java.io.File, .IOException, .PrintStream, java.util.concurrent.Callable, org.apache.pdfbox.Loader, org.apache.pdfbox.pdfwriter.compress.CompressParameters, org.apache.pdfbox.pdmodel.PDDocument, picocli.CommandLine, .CommandLine.Command, .CommandLine.Option

This program will just save the loaded pdf without any changes. As PDFBox doesn't support writing compressed object streams those streams are stripped and will be gone in the resulting file. This is very helpful when trying to debug problems as it'll make it possible to easily look through a PDF using a text editor. It also exposes problems which stem from objects inside object streams overwriting other objects.
Author
Adam Nichols

Field Summary

Modifier and TypeField and Description
private File
private File
private final PrintStream
pack-priv boolean

Constructor Summary

AccessConstructor and Description
public

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[]
The command-line arguments.
args
)

This is the entry point for the application.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

infileback to summary
private File infile
Annotations
@Option
names:-i, --input
description:the PDF file to decompress
required:true
outfileback to summary
private File outfile
Annotations
@Option
names:-o, --output
description:the decompressed PDF file. If omitted the original file is overwritten.
SYSERRback to summary
private final PrintStream SYSERR
Annotations
@SuppressWarnings:squid:S106
usageHelpRequestedback to summary
pack-priv boolean usageHelpRequested
Annotations
@Option
names:-h, --help
usageHelp:true
description:display this help message

Constructor Detail

DecompressObjectstreamsback to summary
public DecompressObjectstreams()

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)

This is the entry point for the application.

Parameters
args:String[]

The command-line arguments.