Foxit PDF RDK

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

## Public Member Functions
| constructor ()
| Constructor. More...
| IsEmpty ()
| Check whether current object is empty or not. More...
| SetCleanUpOptions (clean_up_options)
| Set optimization related options for cleaning up. More...
| SetColorGrayImageSettings (settings)
| Set optimization related settings for color/gray image. More...
| SetDiscardObjectsOptions (discard_objects_options)
| Set optimization related options for discarding objects. More...
| SetDiscardUserDataOptions (discard_userdata_options)
| Set optimization related options for discarding user data. More...
| SetMonoImageSettings (settings)
| Set optimization related settings for monochrome image. More...
| SetOptimizerOptions (optimize_options)
| Set options to decide which kind of optimizer setting will be used for optimizing PDF document. More...
| SetUnembeddedFontSettings (settings)
| Set optimization related settings for unembedding fonts. More...
Public Member Functions inherited from NativeObjectWrapper
| constructor (r)
| GetPointerAsNumber ()

## Static Public Attributes
static | _DiscardObjectsFlattenFormFields
| Flatten form fields.
static | e_CleanUpRemoveInvalidBookmarks
| Remove invalid bookmarks.
static | e_CleanUpRemoveInvalidLinks
| Remove invalid links.
static | e_CleanUpUseFlateForNonEncodedStream
| Enumeration for cleaning up options. More...
static | e_CleanUpUseFlateInsteadOfLZW
| In streams that use LZW encoding, use Flate instead.
static | e_DiscardObjectsAlternateImages
| Discard all alternate images. More...
static | e_DiscardObjectsBookmarks
| Discard bookmarks.
static | e_DiscardObjectsDocumentTags
| Discard document tags.
static | e_DiscardObjectsEmbeddedPageThumbnails
| Discard embedded page thumbnails.
static | e_DiscardObjectsEmbeddedPrintSettings
| Discard embedded print settings.
static | e_DiscardObjectsEmbeddedSearchIndex
| Discard embedded search index.
static | e_DiscardObjectsFormActions
| Enumeration for discarding objects options. More...
static | e_DiscardObjectsJavaScriptActions
| Discard all JavaScript actions. More...
static | e_DiscardUserDataAllAnnotsFormsAndMultimedia
| Enumeration for discarding user data options. More...
static | e_DiscardUserDataDocumentInfoAndMetaData
| Discard document information and metadata.
static | e_DiscardUserDataExternalCrossReferences
| Discard external cross references.
static | e_DiscardUserDataFileAttchments
| Discard file attachments.
static | e_DiscardUserDataLayer
| Discard hidden layer content and flatten visible layers.
static | e_DiscardUserDataPrivateDataOfOtherApp
| Discard private data of other applications.
static | e_OptimizerCleanUp
| Optimize PDF document by cleaning up.
static | e_OptimizerCompressImages
| Enumeration for optimizer options. More...
static | e_OptimizerDiscardObjects
| Optimize PDF document by discarding objects.
static | e_OptimizerDiscardUserData
| Optimize PDF document by discarding user data.
static | e_OptimizerUnembeddedFonts
| Optimize PDF document by unembedding some embedded fonts.

## Detailed Description

This class represents settings for optimizing a PDF document. It would be used in class Optimizer.

See also
  Optimizer

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()

OptimizerSettings.constructor | ( |  | ) |

Constructor.

This constructor is to construct a optimizer settings object with default setting options. User can also call "set" methods in this class to change setting options. Please refer to comment in other settings class (which can be set to current object) for more details about what default setting options are.

## ◆ IsEmpty()

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

## ◆ SetCleanUpOptions()

OptimizerSettings.SetCleanUpOptions | ( | clean_up_options |  | ) |

Set optimization related options for cleaning up.

For a newly constructed object, if this function is not called to set any clean-up options, that means not to do clean-up optimization. Clean-up options set by this function are useful only when option value OptimizerSettings.e_OptimizerCleanUp is set by function OptimizerSettings.SetOptimizerOptions.

Parameters

  [in] | clean_up_options | Optimization related options for cleaning up. 0 means not to do clean-up optimization. Please refer to values starting from OptimizerSettings.e_CleanUpUseFlateForNonEncodedStream and this can be one or a combination of these values.

Returns
  None.

## ◆ SetColorGrayImageSettings()

OptimizerSettings.SetColorGrayImageSettings | ( | settings |  | ) |

Set optimization related settings for color/gray image.

For a newly constructed object, if this function is not called to set any color/gray image settings, that means to use default color/gray image settings. Please refer to comment in class ImageSettings for default values.
ImageSettings set by this function is useful only when option value OptimizerSettings.e_OptimizerCompressImages is set by function OptimizerSettings.SetOptimizerOptions.

Parameters

  [in] | settings | Optimization related settings for color and grayscale images.

Returns
  None.

## ◆ SetDiscardObjectsOptions()

OptimizerSettings.SetDiscardObjectsOptions | ( | discard_objects_options |  | ) |

Set optimization related options for discarding objects.

For a newly constructed object, if this function is not called to set any discard-objects options, that means not to do discard-objects optimization. Discard-objects options set by this function are useful only when option value OptimizerSettings.e_OptimizerDiscardObjects is set by function OptimizerSettings.SetOptimizerOptions.

Parameters

  [in] | discard_objects_options | Optimization related options for discarding objects. 0 means not to do discarding-objects optimization. Please refer to values starting from OptimizerSettings.e_DiscardObjectsFormActions and this can be one or a combination of these values.

Returns
  None.

## ◆ SetDiscardUserDataOptions()

OptimizerSettings.SetDiscardUserDataOptions | ( | discard_userdata_options |  | ) |

Set optimization related options for discarding user data.

For a newly constructed object, if this function is not called to set any discard-userdata options, that means not to do discard-userdata optimization. Discard-userdata options set by this function are useful only when option value OptimizerSettings.e_OptimizerDiscardUserData is set by function OptimizerSettings.SetOptimizerOptions.

Parameters

  [in] | discard_userdata_options | Optimization related options for discarding user data. 0 means not to do discarding-userdata optimization. Please refer to values starting from OptimizerSettings.e_DiscardUserDataAllAnnotsFormsAndMultimedia and this can be one or a combination of these values.

Returns
  None.

## ◆ SetMonoImageSettings()

OptimizerSettings.SetMonoImageSettings | ( | settings |  | ) |

Set optimization related settings for monochrome image.

For a newly constructed object, if this function is not called to set any monochrome image settings, that means to use default monochrome image settings. Please refer to comment in class ImageSettings for detail values.
MonoImageSettings set by this function is useful only when option value OptimizerSettings.e_OptimizerCompressImages is set by function OptimizerSettings.SetOptimizerOptions.

Parameters

  [in] | settings | Optimization related settings for monochrome images.

Returns
  None.

## ◆ SetOptimizerOptions()

OptimizerSettings.SetOptimizerOptions | ( | optimize_options |  | ) |

Set options to decide which kind of optimizer setting will be used for optimizing PDF document.

For a newly constructed object, if this function is not called to set any optimizer options, that means no optimizer setting is useful.

Parameters

  [in] | optimize_options | The options to decide which kind of optimizer setting will be used for optimizing PDF document. 0 means no optimizer setting of any kind is useful. Please refer to values starting from OptimizerSettings.e_OptimizerCompressImages and this can be one or a combination of these values.

Returns
  None.

## ◆ SetUnembeddedFontSettings()

OptimizerSettings.SetUnembeddedFontSettings | ( | settings |  | ) |

Set optimization related settings for unembedding fonts.

For a newly constructed object, if this function is not called to set any unembedded fonts settings, that means to no font is to be unembedded. UnembeddedFontSettings set by this function is useful only when option value OptimizerSettings.e_OptimizerUnembeddedFonts is set by function OptimizerSettings.SetOptimizerOptions.

Parameters

  [in] | settings | Optimization related settings for unembedding fonts.

Returns
  None.

## Member Data Documentation

## ◆ e_CleanUpUseFlateForNonEncodedStream

OptimizerSettings.e_CleanUpUseFlateForNonEncodedStream
| static

Enumeration for cleaning up options.

Values of this enumeration can be used alone or in a combination.

Use Flate to encode streams that are not encoded.

## ◆ e_DiscardObjectsAlternateImages

OptimizerSettings.e_DiscardObjectsAlternateImages
| static

Discard all alternate images.

Some PDF documents include multiple versions of the same image for different purposes, such as low-resolution on-screen viewing and high-resolution printing. If this option value is set to be used, that means to remove all versions of an image except the one destined for on-screen viewing.

## ◆ e_DiscardObjectsFormActions

OptimizerSettings.e_DiscardObjectsFormActions
| static

Enumeration for discarding objects options.

Values of this enumeration can be used alone or in a combination.

Discard all form submission, import and reset actions.

## ◆ e_DiscardObjectsJavaScriptActions

OptimizerSettings.e_DiscardObjectsJavaScriptActions
| static

Discard all JavaScript actions.

Currently, it can not remove the javascript action in "OpenAction" of catalog.

## ◆ e_DiscardUserDataAllAnnotsFormsAndMultimedia

OptimizerSettings.e_DiscardUserDataAllAnnotsFormsAndMultimedia
| static

Enumeration for discarding user data options.

Values of this enumeration can be used alone or in a combination.

Discard all annotations, forms and multimedia.

## ◆ e_OptimizerCompressImages

OptimizerSettings.e_OptimizerCompressImages
| static

Enumeration for optimizer options.

Values of this enumeration can be used alone or in a combination.

Optimize PDF document by compressing images.