public static class

Optimizer.MonoImageSettings

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.Optimizer.MonoImageSettings

Class Overview

A class that stores image downsampling/recompression settings for monochrome images.

Summary

Constants
int e_ccitt CCITT group 4 compression
int e_default The constant e_default
int e_flate Flate compression
int e_jbig2 JBIG2 compression
int e_none No compression
int e_off The constant e_off
Public Constructors
MonoImageSettings()
create an MonoImageSettings object with default options
Public Methods
void forceChanges(boolean force)
Sets whether image changes that grow the PDF file should be kept.
void forceRecompression(boolean force)
Sets whether recompression to the specified compression method should be forced when the image is not downsampled.
void setCompressionMode(int mode)
Sets the output compression mode for monochrome images The default value is e_ccitt
void setDownsampleMode(int mode)
void setImageDPI(double maximum, double resampling)
Sets the maximum and resampling dpi for monochrome images.
void setJBIG2Threshold(double jbig2_threshold)
Sets the quality for lossy JBIG2Decode compression mode.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int e_ccitt

CCITT group 4 compression

Constant Value: 3 (0x00000003)

public static final int e_default

The constant e_default

Constant Value: 1 (0x00000001)

public static final int e_flate

Flate compression

Constant Value: 1 (0x00000001)

public static final int e_jbig2

JBIG2 compression

Constant Value: 0 (0x00000000)

public static final int e_none

No compression

Constant Value: 2 (0x00000002)

public static final int e_off

The constant e_off

Constant Value: 0 (0x00000000)

Public Constructors

public MonoImageSettings ()

create an MonoImageSettings object with default options

Public Methods

public void forceChanges (boolean force)

Sets whether image changes that grow the PDF file should be kept. This is off by default.

Parameters
force if true all image changes will be kept.

public void forceRecompression (boolean force)

Sets whether recompression to the specified compression method should be forced when the image is not downsampled. By default the compression method for these images will not be changed.

Parameters
force if true the compression method for all images will be changed to the specified compression mode

public void setCompressionMode (int mode)

Sets the output compression mode for monochrome images The default value is e_ccitt

Parameters
mode the compression mode to set

public void setDownsampleMode (int mode)

public void setImageDPI (double maximum, double resampling)

Sets the maximum and resampling dpi for monochrome images. By default these are set to 450 and 300 respectively.

Parameters
maximum the highest dpi of an image before it will be resampled
resampling the image dpi to resample to if an image is encountered over the maximum dpi

public void setJBIG2Threshold (double jbig2_threshold)

Sets the quality for lossy JBIG2Decode compression mode. The threshold is a floating point number in the range from 4 to 9 The default value for JBIG2 is 8.5. The setting is ignored for FLATE.