Foxit PDF SDK
|
Public Member Functions | |
MonoImageSettings () | |
Constructor. More... | |
MonoImageSettings (MonoImageSettings other) | |
Constructor, with another result information object. More... | |
boolean | isEmpty () |
Check whether current object is empty or not. More... | |
void | setCompressionMode (int mode) throws com.foxit.sdk.PDFException |
Set compression mode used for optimizing monochrome images in a PDF document. More... | |
void | setImageDPI (int dpi) throws com.foxit.sdk.PDFException |
Set the DPI value as the target compressed value for compressing monochrome images in a PDF document. More... | |
void | setImageDPILimit (int dpi_limit) throws com.foxit.sdk.PDFException |
Set the lower limit DPI value for the monochrome image to decide if the image is to be compressed in a PDF document. More... | |
void | setQuality (int quality) throws com.foxit.sdk.PDFException |
Set compression quality, used for optimizing monochrome images in a PDF document. More... | |
void | setStretchMode (int mode) throws com.foxit.sdk.PDFException |
Set stretch mode used for optimizing monochrome images in a PDF document. More... | |
Static Public Attributes | |
static final int | e_ImageCompressCCITT3 = 10001 |
Compression mode: CCITT Group 3. | |
static final int | e_ImageCompressCCITT4 = 10002 |
Compression mode: CCITT Group 4. | |
static final int | e_ImageCompressHigh = 10003 |
Compression mode: high. | |
static final int | e_ImageCompressjbig2 = 10004 |
Compression mode: jbig2. | |
static final int | e_ImageCompressQualityLossless = 1 |
Compression quality: Lossless. | |
static final int | e_ImageCompressQualityLossy = 2 |
Compression quality: Lossy. | |
static final int | e_ImageCompressRetain = 10007 |
Compression mode: retain, which means no compression. | |
static final int | e_ImageCompressRunLength = 10008 |
Compression mode: run-length. | |
static final int | e_StretchBicubic = 0x80 |
When this is set, that means to do bicubic interpolation for zooming. | |
static final int | e_StretchDefault = -1 |
When this is set, that means to do default stretching. | |
static final int | e_StretchDownsample = 0x04 |
When this is set, that means not to do halftone for shrinking or rotating. | |
static final int | e_StretchInterpol = 0x20 |
When this is set, that means to do interpolation for zooming. | |
static final int | e_StretchNoSmooth = 0x100 |
When this is set, that means not to do any interpolation for stretching. | |
static final int | e_StretchOff = 0x00 |
When this is set, that means to do without stretching. | |
This class represents downsampling/recompression settings for monochrome images. This class object can be set to class OptimizerSettings and then be used to optimize a PDF document.
com.foxit.sdk.addon.optimization.MonoImageSettings.MonoImageSettings | ( | ) |
Constructor.
This constructor is to construct a monochrome image settings object with default setting options. User can also calling "set" methods in this class to change these setting options. Please refer to comment of these "set" methods for more details about default values.
com.foxit.sdk.addon.optimization.MonoImageSettings.MonoImageSettings | ( | MonoImageSettings | other | ) |
Constructor, with another result information object.
[in] | other | Another monochrome image settings object. |
boolean com.foxit.sdk.addon.optimization.MonoImageSettings.isEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
void com.foxit.sdk.addon.optimization.MonoImageSettings.setCompressionMode | ( | int | mode | ) | throws com.foxit.sdk.PDFException |
Set compression mode used for optimizing monochrome images in a PDF document.
For a newly constructed object, if this function is not called to set option, that means to use com.foxit.sdk.addon.optimization.MonoImageSettings.e_ImageCompressCCITT4 as the deault value of this option.
[in] | mode | Image compression mode. Please refer to values starting from com.foxit.sdk.addon.optimization.MonoImageSettings.e_ImageCompressHigh and this should be one of these values. |
void com.foxit.sdk.addon.optimization.MonoImageSettings.setImageDPI | ( | int | dpi | ) | throws com.foxit.sdk.PDFException |
Set the DPI value as the target compressed value for compressing monochrome images in a PDF document.
When an image can be compressed, the resolution of this image will be compressed to the DPI value set by current function.
For a newly constructed object, if this function is not called to set option, that means to use 250 as the deault value of this option.
[in] | dpi | DPI value. If the images can be compressed, the resolution of these images will be compressed to this value. |
void com.foxit.sdk.addon.optimization.MonoImageSettings.setImageDPILimit | ( | int | dpi_limit | ) | throws com.foxit.sdk.PDFException |
Set the lower limit DPI value for the monochrome image to decide if the image is to be compressed in a PDF document.
If the resolution of an image in the PDF document is above the lower limit DPI value, this image will be compressed to the target compressed DPI value which is set by function MonoImageSettings.setImageDPI .
For a newly constructed object, if this function is not called to set option, that means a DPI value (which is 1.5 times of target compressed DPI value) will be used as the default value of this option.
[in] | dpi_limit | DPI value as the lower limit. This value should be a positive number. Suggested range: bigger than target compressed DPI value (set by function MonoImageSettings.setImageDPI ) and the maximum value is 10 times of target compressed DPI value. If input value is not bigger than the target compressed DPI value, a DPI value which is one more than the target compressed DPI value will be used instead. If input value is bigger than the maximum value, the maximum value value will be used instead. |
void com.foxit.sdk.addon.optimization.MonoImageSettings.setQuality | ( | int | quality | ) | throws com.foxit.sdk.PDFException |
Set compression quality, used for optimizing monochrome images in a PDF document.
For a newly constructed object, if this function is not called to set this option, that means to use com.foxit.sdk.addon.optimization.MonoImageSettings.e_ImageCompressQualityLossless as the deault value of this option.
[in] | quality | Compression quality. Please refer to values starting from com.foxit.sdk.addon.optimization.MonoImageSettings.e_ImageCompressQualityLossless and this should be one of these values. |
void com.foxit.sdk.addon.optimization.MonoImageSettings.setStretchMode | ( | int | mode | ) | throws com.foxit.sdk.PDFException |
Set stretch mode used for optimizing monochrome images in a PDF document.
For a newly constructed object, if this function is not called to set this option, that means to use com.foxit.sdk.addon.optimization.MonoImageSettings.e_StretchBicubic as the deault value of this option.
[in] | mode | Stretch mode. Please refer to values starting from com.foxit.sdk.addon.optimization.ImageSettings.e_StretchOff and this should be one of these values. |