Foxit PDF SDK
FoxitPDFSDKPython3.ComplianceEngine Class Reference

Inherits FoxitPDFSDKPython3._object.

Static Public Member Functions

def Initialize ()
 Initialize compliance engine.
More...
 
def InitializeThreadContext ()
 Initialize compliance context for a new thread.
More...
 
def Release ()
 Release compliance engine.
More...
 
def ReleaseThreadContext ()
 Release compliance context of the thread.
More...
 
def SetLanguage (language)
 Set language for compliance engine.
More...
 
def SetTempFolderPath (temp_folder_path)
 Set a temp folder for compliance engine.
More...
 

Detailed Description

Compliance module can be used to verify if a PDF file matches a specified industry standard version (e.g. one of PDF/A version) or convert a PDF file to a specified industry standard version (e.g. one of PDF/A version). Before initializing compliance engine and using any class or methods in this module, please ensure Foxit PDF SDK has been initialized successfully by function FoxitPDFSDKPython3.Library.Initialize with a key including "Compliance" module.

See also
FoxitPDFSDKPython3.Library

Member Function Documentation

◆ Initialize()

FoxitPDFSDKPython3.ComplianceEngine.Initialize ( )
static

Initialize compliance engine.

This should be called successfully before any other methods in compliance add-on module.

Parameters
[in]compliance_resource_folder_pathA complete path to compliance resource folder. This should not be an empty string.
[in]compliance_engine_unlockcodeThe unlock code for compliance engine.
  • If an authorization key is used for Foxit PDF SDK, please pass a valid unlock code string to initialize compliance engine.
  • If a trial key is used for Foxit PDF SDK, this parameter will be ignored. Just pass an empty string.

Returns
FoxitPDFSDKPython3.e_ErrSuccess means success.
FoxitPDFSDKPython3.e_ErrNoComplianceModuleRight means Foxit PDF SDK has not been initialized with a key including "Compliance" module.
FoxitPDFSDKPython3.e_ErrParam means parameter compliance_resource_folder_pathis an empty string, or parameter compliance_engine_unlockcode is an empty string when an authorization key is used for Foxit PDF SDK.
FoxitPDFSDKPython3.e_ErrFilePathNotExist means parameter compliance_resource_folder_path does not exist or no library for compliance engine can be found under this folder.
FoxitPDFSDKPython3.e_ErrComplianceEngineInvalidUnlockCode means parameter compliance_engine_unlockcode is an invalid unlock code for compliance engine when an authorization key is used for Foxit PDF SDK.
For more information about error code values, please refer to values starting from FoxitPDFSDKPython3.e_ErrSuccess .
Note
If module "Compliance" is not defined in the license information which is used in function FoxitPDFSDKPython3.Library.Initialize , that means user has no right in using compliance related functions and this constructor will throw exception FoxitPDFSDKPython3.e_ErrNoComplianceModuleRight .

◆ InitializeThreadContext()

FoxitPDFSDKPython3.ComplianceEngine.InitializeThreadContext ( )
static

Initialize compliance context for a new thread.

The compliance engine provides thread-safety per default. This should be called successfully for each thread before any other methods in compliance add-on module for multithreading. It is recommended to use a fixed amount of SDK threads (e.g. min=4, max=system-hardware-concurrency). Creating more threads then CPU cores exist will degrade the overall performance. The threads should be re-used as long as possible.

Returns
FoxitPDFSDKPython3.e_ErrSuccess means success.
FoxitPDFSDKPython3.e_ErrNoComplianceModuleRight means Foxit PDF SDK has not been initialized with a key including "Compliance" module.
FoxitPDFSDKPython3.e_ErrComplianceEngineInvalidUnlockCode means parameter compliance_engine_unlockcode is an invalid unlock code for compliance engine when an authorization key is used for Foxit PDF SDK.
For more information about error code values, please refer to values starting from FoxitPDFSDKPython3.e_ErrSuccess .
Note
If module "Compliance" is not defined in the license information which is used in function FoxitPDFSDKPython3.Library.Initialize , that means user has no right in using compliance related functions and this function will throw exception FoxitPDFSDKPython3.e_ErrNoComplianceModuleRight .

◆ Release()

FoxitPDFSDKPython3.ComplianceEngine.Release ( )
static

Release compliance engine.

This function can be called to release compliance engine when no need to use it any more before Foxit PDF SDK is released.

Returns
None.

◆ ReleaseThreadContext()

FoxitPDFSDKPython3.ComplianceEngine.ReleaseThreadContext ( )
static

Release compliance context of the thread.

This function will release compliance context of the thread when no need to use it any more before Foxit PDF SDK is released in the thread. It should be called from the same thread that called FoxitPDFSDKPython3.ComplianceEngine.InitializeThreadContext .

Returns
None.

◆ SetLanguage()

FoxitPDFSDKPython3.ComplianceEngine.SetLanguage (   language)
static

Set language for compliance engine.

Setting a language to compliance engine will have affect on all the strings which are returned with FoxitPDFSDKPython3.ResultInformation or through callback class FoxitPDFSDKPython3.ProgressCallback . If no language name is set by this function, "English" will be used as default.

Parameters
[in]languageLanguage name. This cannot be an empty string and should be one of following language name: "Czech", "Danish", "Dutch", "English", "French", "Finnish", "German", "Italian", "Norwegian", "Polish", "Portuguese", "Spanish", "Swedish", "Chinese-Simplified", "Chinese-Traditional", "Japanese", "Korean". For other language name, this function will do nothing.
Returns
None.

◆ SetTempFolderPath()

FoxitPDFSDKPython3.ComplianceEngine.SetTempFolderPath (   temp_folder_path)
static

Set a temp folder for compliance engine.

Compliance engine may need to store several files for proper processing (e.g verifying or converting). User can use this function to set a temp folder. If no custom temp folder is set by this function, the default temp folder in system will be used.

Parameters
[in]temp_folder_pathA complete path to be set as temp folder. This should be a valid path and should not be an empty string.
Returns
None.