Foxit PDF SDK

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

## Public Member Functions
def | MonoImageSettings ()
| Constructor. More...
def | MonoImageSettings (other)
| Constructor, with another result information object. More...
def | IsEmpty ()
| Check whether current object is empty or not. More...
def | SetCompressionMode (mode)
| Set compression mode used for optimizing monochrome images in a PDF document. More...
def | SetImageDPI (dpi)
| Set the DPI value as the target compressed value for compressing monochrome images in a PDF document. More...
def | 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...
def | SetQuality (quality)
| Set compression quality, used for optimizing monochrome images in a PDF document. More...
def | SetStretchMode (mode)
| Set stretch mode used for optimizing monochrome images in a PDF document. More...

## Static Public Attributes
| e_ImageCompressCCITT3 = _fsdk.MonoImageSettings_e_ImageCompressCCITT3
| Compression mode: CCITT Group 3.
| e_ImageCompressCCITT4 = _fsdk.MonoImageSettings_e_ImageCompressCCITT4
| Compression mode: CCITT Group 4.
| e_ImageCompressHigh = _fsdk.MonoImageSettings_e_ImageCompressHigh
| Compression mode: high.
| e_ImageCompressjbig2 = _fsdk.MonoImageSettings_e_ImageCompressjbig2
| Compression mode: jbig2.
| e_ImageCompressQualityHigh = _fsdk.MonoImageSettings_e_ImageCompressQualityHigh
| Compression quality: High, only for e_ImageCompressHigh compress mode.
| e_ImageCompressQualityLossless = _fsdk.MonoImageSettings_e_ImageCompressQualityLossless
| Compression quality: Lossless.
| e_ImageCompressQualityLossy = _fsdk.MonoImageSettings_e_ImageCompressQualityLossy
| Compression quality: Lossy.
| e_ImageCompressQualityLow = _fsdk.MonoImageSettings_e_ImageCompressQualityLow
| Compression quality: Low, only for e_ImageCompressHigh compress mode.
| e_ImageCompressQualityMaximum = _fsdk.MonoImageSettings_e_ImageCompressQualityMaximum
| Compression quality: Maximum, only for e_ImageCompressHigh compress mode.
| e_ImageCompressQualityMedium = _fsdk.MonoImageSettings_e_ImageCompressQualityMedium
| Compression quality: Medium, only for e_ImageCompressHigh compress mode.
| e_ImageCompressQualityMinimum = _fsdk.MonoImageSettings_e_ImageCompressQualityMinimum
| Compression quality: Minimum, only for e_ImageCompressHigh compress mode.
| e_ImageCompressRetain = _fsdk.MonoImageSettings_e_ImageCompressRetain
| Compression mode: retain, which means no compression.
| e_ImageCompressRunLength = _fsdk.MonoImageSettings_e_ImageCompressRunLength
| Compression mode: run-length.
| e_ImageCompressZip = _fsdk.MonoImageSettings_e_ImageCompressZip
| Compression mode: zip.
| e_StretchBicubic = _fsdk.MonoImageSettings_e_StretchBicubic
| When this is set, that means to do bicubic interpolation for zooming.
| e_StretchDefault = _fsdk.MonoImageSettings_e_StretchDefault
| When this is set, that means to do default stretching.
| e_StretchDownsample = _fsdk.MonoImageSettings_e_StretchDownsample
| When this is set, that means not to do halftone for shrinking or rotating.
| e_StretchInterpol = _fsdk.MonoImageSettings_e_StretchInterpol
| When this is set, that means to do interpolation for zooming.
| e_StretchNoSmooth = _fsdk.MonoImageSettings_e_StretchNoSmooth
| When this is set, that means not to do any interpolation for stretching.
| e_StretchOff = _fsdk.MonoImageSettings_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

## Constructor & Destructor Documentation

## ◆ MonoImageSettings() [1/2]

def FoxitPDFSDKPython2.MonoImageSettings.MonoImageSettings | ( |  | ) |

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.

## ◆ MonoImageSettings() [2/2]

def FoxitPDFSDKPython2.MonoImageSettings.MonoImageSettings | ( |  | other | ) |

Constructor, with another result information object.

Parameters

  [in] | other | Another monochrome image settings object.

## Member Function Documentation

## ◆ IsEmpty()

def FoxitPDFSDKPython2.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()

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

Parameters

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

Returns
  None.

## ◆ SetImageDPI()

def FoxitPDFSDKPython2.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()

def FoxitPDFSDKPython2.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 FoxitPDFSDKPython2.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.

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

Returns
  None.

## ◆ SetQuality()

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

Parameters

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

Returns
  None.

## ◆ SetStretchMode()

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

Parameters

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

Returns
  None.