Foxit PDF SDK
com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings Class Reference
Inheritance diagram for com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings:
com.foxit.sdk.common.Base

Public Member Functions

 OptimizeScannedPDFSettings (OptimizeScannedPDFSettings other)
 Constructor, with another result information object.
More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
boolean isEmpty ()
 Check whether current object is empty or not.
More...
 
void setColorGrayImageCompressionMode (int mode) throws com.foxit.sdk.PDFException
 Set compression mode used for optimizing color/gray images in the scanned PDF document.
More...
 
void setColorGrayImageCompressionQuality (int quality) throws com.foxit.sdk.PDFException
 Set the quality for lossy compression modes, used for optimizing color/gray images in a scanned PDF document.
More...
 
void setMonoImageCompressionMode (int mode) throws com.foxit.sdk.PDFException
 Set compression mode used for optimizing monochrome images in a scanned PDF document.
More...
 
void setOptimizedPages (Range pages) throws com.foxit.sdk.PDFException
 Set the pages which will be optimized.
More...
 

Static Public Attributes

static final int e_ScannedImageCompressHigh = 1
 Compression mode: high.

 
static final int e_ScannedImageCompressjpeg = 2
 Compression mode: jpeg.

 
static final int e_ScannedImageCompressjpeg2000LossLess = 3
 Compression mode: jpeg2000 lossless.

 
static final int e_ScannedImageCompressjpeg2000Lossy = 4
 Compression mode: jpeg2000 lossy.

 
static final int e_ScannedMonoImageCompressCCITT4 = 3
 Compression mode: CCITT Group 4.

 
static final int e_ScannedMonoImageCompressHigh = 4
 Compression mode: high.

 
static final int e_ScannedMonoImageCompressjbig2LossLess = 2
 Compression mode: jbig2 lossless.

 
static final int e_ScannedMonoImageCompressjbig2Lossy = 1
 Compression mode: jbig2 lossy.

 

Detailed Description

This class represents settings for optimizing a scanned PDF document. It would be used in class Optimizer .

See also
Optimizer

Constructor & Destructor Documentation

◆ OptimizeScannedPDFSettings()

com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings.OptimizeScannedPDFSettings ( OptimizeScannedPDFSettings  other)

Constructor, with another result information object.

Parameters
[in]otherAnother optimizer settings object.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings.delete ( )

Clean up related resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

Reimplemented from com.foxit.sdk.common.Base.

◆ isEmpty()

boolean com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings.isEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ setColorGrayImageCompressionMode()

void com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings.setColorGrayImageCompressionMode ( int  mode) throws com.foxit.sdk.PDFException

Set compression mode used for optimizing color/gray images in the scanned PDF document.

For a newly constructed object, if this function is not called to set option, that means to use OptimizeScannedPDFSettings::e_ImageCompressjpeg as the default value of this option.

Parameters
[in]modeImage compression mode. Please refer to values starting from com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings.e_ScannedImageCompressHigh and this should be one of these values.
Returns
None.

◆ setColorGrayImageCompressionQuality()

void com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings.setColorGrayImageCompressionQuality ( int  quality) throws com.foxit.sdk.PDFException

Set the quality for lossy compression modes, used for optimizing color/gray images in a scanned PDF document.

For a newly constructed object, if this function is not called to set this option, that means to use 33 as the default value of this option.

Parameters
[in]qualityQuality value for lossy compression modes, the value must between 0 and 100.
Note
This method only valid in com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings.e_ScannedImageCompressHigh and com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings.e_ScannedImageCompressjpeg compress mode.
Returns
None.

◆ setMonoImageCompressionMode()

void com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings.setMonoImageCompressionMode ( int  mode) throws com.foxit.sdk.PDFException

Set compression mode used for optimizing monochrome images in a scanned 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.OptimizeScannedPDFSettings.e_ScannedMonoImageCompressjbig2Lossy as the default value of this option.

Parameters
[in]modeImage compression mode. Please refer to values starting from com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings.e_ScannedMonoImageCompressjbig2Lossy and this should be one of these values.
Returns
None.

◆ setOptimizedPages()

void com.foxit.sdk.addon.optimization.OptimizeScannedPDFSettings.setOptimizedPages ( Range  pages) throws com.foxit.sdk.PDFException

Set the pages which will be optimized.

For a newly constructed object,if this function is not called. all pages will be optimized.

Parameters
[in]pagesThe Specify pages, If pages doesn't not add pages index means all pages will be optimized.
Returns
None.