Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.addon.optimization.OptimizeScannedPDFSettings Class Reference
Inheritance diagram for foxit.addon.optimization.OptimizeScannedPDFSettings:

## Public Types
enum | ScannedImageCompressMode { ScannedImageCompressMode.e_ScannedImageCompressHigh = 1, ScannedImageCompressMode.e_ScannedImageCompressjpeg = 2, ScannedImageCompressMode.e_ScannedImageCompressjpeg2000LossLess = 3, ScannedImageCompressMode.e_ScannedImageCompressjpeg2000Lossy = 4 }
| Enumeration for compression mode used for color or gray image. More...
enum | ScannedMonoImageCompressMode { ScannedMonoImageCompressMode.e_ScannedMonoImageCompressjbig2Lossy = 1, ScannedMonoImageCompressMode.e_ScannedMonoImageCompressjbig2LossLess = 2, ScannedMonoImageCompressMode.e_ScannedMonoImageCompressCCITT4 = 3, ScannedMonoImageCompressMode.e_ScannedMonoImageCompressHigh = 4 }
| Enumeration for compression mode used for monochrome image. More...

## Public Member Functions
| OptimizeScannedPDFSettings (OptimizeScannedPDFSettings other)
| Constructor, with another result information object. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...
void | SetColorGrayImageCompressionMode (OptimizeScannedPDFSettings.ScannedImageCompressMode mode)
| Set compression mode used for optimizing color/gray images in the scanned PDF document. More...
void | SetColorGrayImageCompressionQuality (int quality)
| Set the quality for lossy compression modes, used for optimizing color/gray images in a scanned PDF document. More...
void | SetMonoImageCompressionMode (OptimizeScannedPDFSettings.ScannedMonoImageCompressMode mode)
| Set compression mode used for optimizing monochrome images in a scanned PDF document. More...
void | SetOptimizedPages (Range pages)
| Set the pages which will be optimized. More...

## Detailed Description

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

See also
  Optimizer

## Member Enumeration Documentation

## ◆ ScannedImageCompressMode

enum foxit.addon.optimization.OptimizeScannedPDFSettings.ScannedImageCompressMode
| strong

Enumeration for compression mode used for color or gray image.

Values of this enumeration should be used alone.

Enumerator
e_ScannedImageCompressHigh | Compression mode: high.
e_ScannedImageCompressjpeg | Compression mode: jpeg.
e_ScannedImageCompressjpeg2000LossLess | Compression mode: jpeg2000 lossless.
e_ScannedImageCompressjpeg2000Lossy | Compression mode: jpeg2000 lossy.

## ◆ ScannedMonoImageCompressMode

enum foxit.addon.optimization.OptimizeScannedPDFSettings.ScannedMonoImageCompressMode
| strong

Enumeration for compression mode used for monochrome image.

Values of this enumeration should be used alone.

Enumerator
e_ScannedMonoImageCompressjbig2Lossy | Compression mode: jbig2 lossy.
e_ScannedMonoImageCompressjbig2LossLess | Compression mode: jbig2 lossless.
e_ScannedMonoImageCompressCCITT4 | Compression mode: CCITT Group 4.
e_ScannedMonoImageCompressHigh | Compression mode: high.

## Constructor & Destructor Documentation

## ◆ OptimizeScannedPDFSettings()

foxit.addon.optimization.OptimizeScannedPDFSettings.OptimizeScannedPDFSettings | ( | OptimizeScannedPDFSettings | other | ) |
| inline

Constructor, with another result information object.

Parameters

  [in] | other | Another optimizer settings object.

## Member Function Documentation

## ◆ IsEmpty()

bool foxit.addon.optimization.OptimizeScannedPDFSettings.IsEmpty | ( |  | ) |
| inline

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 foxit.addon.optimization.OptimizeScannedPDFSettings.SetColorGrayImageCompressionMode | ( | OptimizeScannedPDFSettings.ScannedImageCompressMode | mode | ) |
| inline

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] | mode | Image compression mode. Please refer to values starting from foxit.addon.optimization.OptimizeScannedPDFSettings.ScannedImageCompressMode.e_ScannedImageCompressHigh and this should be one of these values.

Returns
  None.

## ◆ SetColorGrayImageCompressionQuality()

void foxit.addon.optimization.OptimizeScannedPDFSettings.SetColorGrayImageCompressionQuality | ( | int | quality | ) |
| inline

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] | quality | Quality value for lossy compression modes, the value must between 0 and 100.

Note
  This method only valid in foxit.addon.optimization.OptimizeScannedPDFSettings.ScannedImageCompressMode.e_ScannedImageCompressHigh and foxit.addon.optimization.OptimizeScannedPDFSettings.ScannedImageCompressMode.e_ScannedImageCompressjpeg compress mode.

Returns
  None.

## ◆ SetMonoImageCompressionMode()

void foxit.addon.optimization.OptimizeScannedPDFSettings.SetMonoImageCompressionMode | ( | OptimizeScannedPDFSettings.ScannedMonoImageCompressMode | mode | ) |
| inline

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 foxit.addon.optimization.OptimizeScannedPDFSettings.ScannedMonoImageCompressMode.e_ScannedMonoImageCompressjbig2Lossy as the default value of this option.

Parameters

  [in] | mode | Image compression mode. Please refer to values starting from foxit.addon.optimization.OptimizeScannedPDFSettings.ScannedMonoImageCompressMode.e_ScannedMonoImageCompressjbig2Lossy and this should be one of these values.

Returns
  None.

## ◆ SetOptimizedPages()

void foxit.addon.optimization.OptimizeScannedPDFSettings.SetOptimizedPages | ( | Range | pages | ) |
| inline

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] | pages | The Specify pages, If pages doesn't not add pages index means all pages will be optimized.

Returns
  None.