PDF Compression (Version 1.0.0): Functions and Operations
PDF Compression
: This adapter compresses PDF documents that exceed a certain size. Documents with a size below 100 KB are compressed only slightly, here the file size can hardly be reduced with the adapter.
Note:
For error-free compression of the PDF document, at least one of the following parameters must be set in the PDF Compression Adapter:
regularCompression
maximumCompression
xRefCompression
mergeResources
quantize
with thenumColors
andalphaThreshold
parameters
Properties
Operation | Defines the operation executed by the function adapter Possible values:
|
Parameters
Adapter | Main adapter class (do not change!) Possible values: de.softproject.x4.adapter.PDFCompression: Main class (Default) |
documentPassword | (optional) Password for encrypting the PDF document Possible values: Character string in password format |
regularCompression | The PDF is reduced in size using regular compression. Note: If only this parameter is set, low compression is to be expected.Possible values:
|
maximumCompression | The PDF is compressed with the maximum value. Best results are achieved in combination with the parameter Note: Activating this parameter can increase the runtime. FormaximumCompression, ZLIB Compression Level 9 is used, which offers the best possible reduction in file size, but has the slowest compression.
Possible values:
|
xRefCompression | The PDF is saved in a compressed xRef table (Cross Reference table). This option is only valid for PDFs from version 1.6 or higher and is not compatible with PDF/A-1 files. Note: Activating this parameter can increase the runtime. With this parameter, the file size can be reduced by 5 to 5 % if the PDF that is to be compressed has not been compressed previously with xRef Compression. Possible values:
|
mergeResources | Merges duplicate resources (fonts, color spaces, bitmap images) to reduce the file size. Note: If the PDF file only has few resources, compression will be low. It makes sense to use this parameter if:
Possible values:
|
quantize | Quantizes images using the parameters Note: In some cases, the parameter Possible values:
|
numColors | The number of colors in images in a PDF. This parameter indicates to which number the number of colors in the PDF shall be reduced to. The values must be a power of two (2n). Possible values:
|
alphaThreshold | Specifies how the transparency is to be handled. Values above 128 lead to higher transparency, values below to lower transparency. Possible values:
|
Status values
1 | The operation has been executed successfully. |
0 | The operation has been executed successfully, but without result. |
-1 | The adapter could not be executed. |