Foxit PDF SDK
fsdk.MonoImageSettings Class Reference

Public Member Functions

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

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

Member Function Documentation

◆ IsEmpty()

def fsdk.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 fsdk.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 fsdk.MonoImageSettingsE_ImageCompressCCITT4 as the default value of this option.

Parameters
[in]modeImage compression mode. Please refer to values starting from fsdk.MonoImageSettingsE_ImageCompressHigh and this should be one of these values.
Returns
None.

◆ SetImageDPI()

def fsdk.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]dpiDPI value. If the images can be compressed, the resolution of these images will be compressed to this value.
Returns
None.

◆ SetImageDPILimit()

def fsdk.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 fsdk.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_limitDPI value as the lower limit. This value should be a positive number. Suggested range: bigger than target compressed DPI value (set by function fsdk.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 fsdk.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 fsdk.MonoImageSettingsE_ImageCompressQualityLossless as the default value of this option.

Parameters
[in]qualityCompression quality. Please refer to values starting from fsdk.MonoImageSettingsE_ImageCompressQualityLossless and this should be one of these values.
Returns
None.

◆ SetStretchMode()

def fsdk.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 fsdk.MonoImageSettingsE_StretchBicubic as the default value of this option.

Parameters
[in]modeStretch mode. Please refer to values starting from fsdk.ImageSettingsE_StretchOff and this should be one of these values.
Returns
None.