Foxit PDF RDK

Public Member Functions | Static Public Attributes | List of all members
MonoImageSettings Class Reference
Inheritance diagram for MonoImageSettings:

## Public Member Functions
| constructor ()
| Constructor. More...
| IsEmpty ()
| Check whether current object is empty or not. More...
| SetCompressionMode (mode)
| Set compression mode used for optimizing monochrome images in a PDF document. More...
| SetImageDPI (dpi)
| Set the DPI value as the target compressed value for compressing monochrome images in a PDF document. More...
| SetImageDPILimit (dpi_limit)
| Set the lower limit DPI value for the monochrome image to decide if the image is to be compressed in a PDF document. More...
| SetQuality (quality)
| Set compression quality, used for optimizing monochrome images in a PDF document. More...
| SetStretchMode (mode)
| Set stretch mode used for optimizing monochrome images in a PDF document. More...
Public Member Functions inherited from NativeObjectWrapper
| constructor (r)
| GetPointerAsNumber ()

## Static Public Attributes
static | e_ImageCompressCCITT3
| Enumeration for compression mode used for monochrome image. More...
static | e_ImageCompressCCITT4
| Compression mode: CCITT Group 4.
static | e_ImageCompressHigh
| Compression mode: high.
static | e_ImageCompressjbig2
| Compression mode: jbig2.
static | e_ImageCompressQualityLossless
| Enumeration for compression quality used for monochrome image. More...
static | e_ImageCompressQualityLossy
| Compression quality: Lossy.
static | e_ImageCompressRetain
| Compression mode: retain, which means no compression.
static | e_ImageCompressRunLength
| Compression mode: run-length.
static | e_StretchBicubic
| When this is set, that means to do bicubic interpolation for zooming.
static | e_StretchDefault
| Enumeration for stretch mode. More...
static | e_StretchDownsample
| When this is set, that means not to do halftone for shrinking or rotating.
static | e_StretchInterpol
| When this is set, that means to do interpolation for zooming.
static | e_StretchNoSmooth
| When this is set, that means not to do any interpolation for stretching.
static | e_StretchOff
| When this is set, that means to do without stretching.

## Detailed Description

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.

See also
  OptimizerSettings

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## Member Function Documentation

## ◆ constructor()

MonoImageSettings.constructor | ( |  | ) |

Constructor.

This constructor is to construct a monochrome image settings object with default setting options. User can also call "set" methods in this class to change these setting options. Please refer to comment of these "set" methods for more details about default values.

## ◆ IsEmpty()

MonoImageSettings.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.

## ◆ SetCompressionMode()

MonoImageSettings.SetCompressionMode | ( | mode |  | ) |

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 ImageSettings.e_ImageCompressCCITT4 as the default value of this option.

Parameters

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

Returns
  None.

## ◆ SetImageDPI()

MonoImageSettings.SetImageDPI | ( | dpi |  | ) |

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 default value of this option.

Parameters

  [in] | dpi | DPI value. If the images can be compressed, the resolution of these images will be compressed to this value.

Returns
  None.

## ◆ SetImageDPILimit()

MonoImageSettings.SetImageDPILimit | ( | dpi_limit |  | ) |

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 ImageSettings.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.

Parameters

  [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 ImageSettings.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.

Returns
  None.

## ◆ SetQuality()

MonoImageSettings.SetQuality | ( | quality |  | ) |

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 ImageSettings.e_ImageCompressQualityLossless as the default value of this option.

Parameters

  [in] | quality | Compression quality. Please refer to values starting from ImageSettings.e_ImageCompressQualityLossless and this should be one of these values.

Returns
  None.

## ◆ SetStretchMode()

MonoImageSettings.SetStretchMode | ( | mode |  | ) |

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 ImageSettings.e_StretchBicubic as the default value of this option.

Parameters

  [in] | mode | Stretch mode. Please refer to values starting from ImageSettings.e_StretchOff and this should be one of these values.

Returns
  None.

## Member Data Documentation

## ◆ e_ImageCompressCCITT3

MonoImageSettings.e_ImageCompressCCITT3
| static

Enumeration for compression mode used for monochrome image.

Values of this enumeration should be used alone.

Compression mode: CCITT Group 3.

## ◆ e_ImageCompressQualityLossless

MonoImageSettings.e_ImageCompressQualityLossless
| static

Enumeration for compression quality used for monochrome image.

Values of this enumeration should be used alone.

Compression quality: Lossless.

## ◆ e_StretchDefault

MonoImageSettings.e_StretchDefault
| static

Enumeration for stretch mode.

Values of this enumeration should be used alone.

When this is set, that means to do default stretching.