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 { e_ScannedImageCompressHigh = 1, e_ScannedImageCompressjpeg = 2, e_ScannedImageCompressjpeg2000LossLess = 3, e_ScannedImageCompressjpeg2000Lossy = 4 }
| Enumeration for compression mode used for color or gray image. More...
enum | ScannedMonoImageCompressMode { e_ScannedMonoImageCompressjbig2Lossy = 1, e_ScannedMonoImageCompressjbig2LossLess = 2, e_ScannedMonoImageCompressCCITT4 = 3, e_ScannedMonoImageCompressHigh = 4 }
| Enumeration for compression mode used for monochrome image. More...

## Public Member Functions
| OptimizeScannedPDFSettings (const OptimizeScannedPDFSettings &other)
| Constructor, with another result information object. More...
| ~OptimizeScannedPDFSettings ()
| Destructor.
bool | IsEmpty () const
| Check whether current object is empty or not. More...
bool | operator != (const OptimizeScannedPDFSettings &other) const
| Not equal operator. More...
OptimizeScannedPDFSettings & | operator= (const OptimizeScannedPDFSettings &other)
| Assign operator. More...
bool | operator== (const OptimizeScannedPDFSettings &other) const
| Equal operator. More...
void | SetColorGrayImageCompressionMode (ScannedImageCompressMode mode)
| Set compression mode used for optimizing color/gray images in the scanned PDF document. More...
void | SetColorGrayImageCompressionQuality (foxit::uint32 quality)
| Set the quality for lossy compression modes, used for optimizing color/gray images in a scanned PDF document. More...
void | SetMonoImageCompressionMode (ScannedMonoImageCompressMode mode)
| Set compression mode used for optimizing monochrome images in a scanned PDF document. More...
void | SetOptimizedPages (const common::Range &pages)
| Set the pages which will be optimized. More...
Public Member Functions inherited from foxit::Base
FS_HANDLE | Handle () const
| Get the handle of current object. 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

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

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 | ( | const OptimizeScannedPDFSettings & | other | ) |

Constructor, with another result information object.

Parameters

  [in] | other | Another optimizer settings object.

## Member Function Documentation

## ◆ IsEmpty()

bool foxit::addon::optimization::OptimizeScannedPDFSettings::IsEmpty | ( |  | ) | const

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.

## ◆ operator !=()

bool foxit::addon::optimization::OptimizeScannedPDFSettings::operator != | ( | const OptimizeScannedPDFSettings & | other | ) | const

Not equal operator.

Parameters

  [in] | other | Another result optimizer settings object. This function will check if current object is not equal to this one.

Returns
  true means not equal, while false means equal.

## ◆ operator=()

OptimizeScannedPDFSettings& foxit::addon::optimization::OptimizeScannedPDFSettings::operator= | ( | const OptimizeScannedPDFSettings & | other | ) |

Assign operator.

Parameters

  [in] | other | Another result optimizer settings object, whose value would be assigned to current object.

Returns
  Reference to current object itself.

## ◆ operator==()

bool foxit::addon::optimization::OptimizeScannedPDFSettings::operator== | ( | const OptimizeScannedPDFSettings & | other | ) | const

Equal operator.

Parameters

  [in] | other | Another result optimizer settings object. This function will check if current object is equal to this one.

Returns
  true means equal, while false means not equal.

## ◆ SetColorGrayImageCompressionMode()

void foxit::addon::optimization::OptimizeScannedPDFSettings::SetColorGrayImageCompressionMode | ( | ScannedImageCompressMode | mode | ) |

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 OptimizeScannedPDFSettings::e_ScannedImageCompressHigh and this should be one of these values.

Returns
  None.

## ◆ SetColorGrayImageCompressionQuality()

void foxit::addon::optimization::OptimizeScannedPDFSettings::SetColorGrayImageCompressionQuality | ( | foxit::uint32 | quality | ) |

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 OptimizeScannedPDFSettings::e_ScannedImageCompressHigh and OptimizeScannedPDFSettings::e_ScannedImageCompressjpeg compress mode.

Returns
  None.

## ◆ SetMonoImageCompressionMode()

void foxit::addon::optimization::OptimizeScannedPDFSettings::SetMonoImageCompressionMode | ( | ScannedMonoImageCompressMode | mode | ) |

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 OptimizeScannedPDFSettings::e_ScannedMonoImageCompressjbig2Lossy as the default value of this option.

Parameters

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

Returns
  None.

## ◆ SetOptimizedPages()

void foxit::addon::optimization::OptimizeScannedPDFSettings::SetOptimizedPages | ( | const common::Range & | pages | ) |

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.