new MonoImageSettings()
An object that stores downsampling/recompression settings for monochrome images.
Members
-
<static> CompressionMode
-
Properties:
Name Type Description e_jbig2
number e_flate
number e_none
number -
<static> DownsampleMode
-
Properties:
Name Type Description e_off
number e_default
number
Methods
-
forceChanges(force)
-
Sets whether image changes that grow the PDF file should be kept. This is off by default.
Parameters:
Name Type Description force
boolean if true all image changes will be kept. Returns:
this object, for call chaining -
forceRecompression(force)
-
Sets whether recompression to the specified compression method, should be forced when the image is not downsampled. By default the compression method for these images will not be changed.
Parameters:
Name Type Description force
boolean if true the compression method for all Returns:
this object, for call chaining -
setCompressionMode(mode)
-
Sets the output compression mode for monochrome images The default value is e_jbig2
Parameters:
Name Type Description mode
number the compression mode to set PDFNet.Optimizer.MonoImageSettings.CompressionMode = { e_jbig2 : 0, e_flate : 1, e_none : 2 }
Returns:
this object, for call chaining -
setDownsampleMode(mode)
-
Sets the downsample mode for monochrome images The default value is e_default
Parameters:
Name Type Description mode
number the compression mode to set PDFNet.Optimizer.MonoImageSettings.DownsampleMode = { e_off : 0, e_default : 1 }
Returns:
this object, for call chaining -
setImageDPI(maximum, resampling)
-
Sets the maximum and resampling dpi for monochrome images. By default these are set to 450 and 300 respectively.
Parameters:
Name Type Description maximum
number the highest dpi of an image before it will be resampled resampling
number the image dpi to resample to if an image is encountered over the maximum dpi Returns:
this object, for call chaining -
setJBIG2Threshold(jbig2_threshold)
-
Sets the quality for lossy JBIG2Decode compression mode. The threshold is a floating point number in the range from 4 to 9 The default value for JBIG2 is 8.5. The setting is ignored for FLATE.
Parameters:
Name Type Description jbig2_threshold
number the quality for lossy compression modes. Returns:
this object, for call chaining