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_default The constant e_default
int e_flate The constant e_flate
int e_jbig2 The constant e_jbig2
int e_none The constant e_none
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)
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 compression modes from 1 to 10 where 10 is lossless (if possible).
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int e_default

The constant e_default

Constant Value: 1 (0x00000001)

public static final int e_flate

The constant e_flate

Constant Value: 1 (0x00000001)

public static final int e_jbig2

The constant e_jbig2

Constant Value: 0 (0x00000000)

public static final int e_none

The constant e_none

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)

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 compression modes from 1 to 10 where 10 is lossless (if possible). The default value for JBIG2 is 8.5. The setting is ignored for FLATE.