PTMonoImageSettings

@interface PTMonoImageSettings : NSObject

A class that stores image downsampling/recompression settings for monochrome images.

  • create an MonoImageSettings object with default options

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()
  • Sets the maximum and resampling dpi for monochrome images. By default these are set to 144 and 96 respectively.

    Declaration

    Objective-C

    - (void)SetImageDPI:(double)maximum resampling:(double)resampling;

    Swift

    func setImageDPI(_ maximum: Double, resampling: Double)

    Parameters

    maximum

    the highest dpi of an image before it will be resampled

    resampling

    the image dpi to resample to if an image is encountered over the maximum dpi

  • Sets the output compression mode for monochrome images The default value is e_ccitt (CCITT group 4 compression)

    Declaration

    Objective-C

    - (void)SetCompressionMode:(PTMonoCompressionMode)mode;

    Swift

    func setCompressionMode(_ mode: PTMonoCompressionMode)

    Parameters

    mode

    the compression mode to set

  • Sets the downsample mode for monochrome images The default value is e_default

    Declaration

    Objective-C

    - (void)SetDownsampleMode:(PTMonoDownsampleMode)mode;

    Swift

    func setDownsampleMode(_ mode: PTMonoDownsampleMode)

    Parameters

    mode

    the compression mode to set

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

    Declaration

    Objective-C

    - (void)ForceRecompression:(BOOL)force;

    Swift

    func forceRecompression(_ force: Bool)

    Parameters

    force

    if true the compression method for all images will be changed to the specified compression mode

  • Sets whether image changes that grow the PDF file should be kept. This is off by default.

    Declaration

    Objective-C

    - (void)ForceChanges:(BOOL)force;

    Swift

    func forceChanges(_ force: Bool)

    Parameters

    force

    if true all image changes will be kept.

  • Sets the quality for lossy compression modes from 1 to 10 where 10 is lossless (if possible). The default value for JBIG2 is 8.5. The setting is ignored for FLATE.

    Declaration

    Objective-C

    - (void)SetJBIG2Threshold:(double)jbig2_threshold;

    Swift

    func setJBIG2Threshold(_ jbig2_threshold: Double)