Foxit PDF SDK
FoxitPDFSDKPython3.Optimizer Class Reference
Inheritance diagram for FoxitPDFSDKPython3.Optimizer:
FoxitPDFSDKPython3.Base

Static Public Attributes

 Optimize = _fsdk.Optimizer_Optimize
 Optimize the given PDF document with specified optimizer settings. More...
 
 StartSubsetEmbedFont = _fsdk.Optimizer_StartSubsetEmbedFont
 Start to make subsets for embedded fonts in the given PDF document. More...
 

Detailed Description

This class can be used to optimize PDF file to reduce file size. Before using this class to do optimization, please ensure Foxit PDF SDK has been initialized successfully by function FoxitPDFSDKPython3.Library.Initialize with a key including "Optimizer" module.

See also
FoxitPDFSDKPython3.Library

Member Data Documentation

◆ Optimize

FoxitPDFSDKPython3.Optimizer.Optimize = _fsdk.Optimizer_Optimize
static

Optimize the given PDF document with specified optimizer settings.

Parameters
[in]docA valid PDF document object to be optimized.
[in]settingsSetting data used for optimization processing settings.
[in]pausePause object which decides if the process needs to be paused. This can be null which means not to pause during the optimization process. If this is not null, it should be a valid pause object implemented by user.
Note
If module "Optimizer" is not defined in the license information which is used in function FoxitPDFSDKPython3.Library.Initialize , that means user has no right in using Optimization related functions and this function will throw exception FoxitPDFSDKPython3.e_ErrNoOptimizerModuleRight .
Returns
A progressive object. Please check the rate of current progress by function FoxitPDFSDKPython3.Progressive.GetRateOfProgress . If the rate is not 100 yet, call function FoxitPDFSDKPython3.Progressive.Continue to continue the progress until the progress is finished.

◆ StartSubsetEmbedFont

FoxitPDFSDKPython3.Optimizer.StartSubsetEmbedFont = _fsdk.Optimizer_StartSubsetEmbedFont
static

Start to make subsets for embedded fonts in the given PDF document.

This function can be used to remove useless embedded characters from the data of embedded fonts (if there's any in a PDF document) in order to reduce the size of a PDF document.

Parameters
[in]docA valid PDF document object to be processed a subset of embedded fonts.
[in]pausePause object which decides if the process needs to be paused. This can be null which means not to pause during the embeded font subset process. If this is not null, it should be a valid pause object implemented by user.
Note
If module "Optimizer" is not defined in the license information which is used in function FoxitPDFSDKPython3.Library.Initialize , that means user has no right in using Optimization related functions and this function will throw exception FoxitPDFSDKPython3.e_ErrNoOptimizerModuleRight .
Returns
A progressive object. Please check the rate of current progress by function FoxitPDFSDKPython3.Progressive.GetRateOfProgress . If the rate is not 100 yet, call function FoxitPDFSDKPython3.Progressive.Continue to continue the progress until the progress is finished.