Foxit PDF SDK
foxit.addon.compliance.ComplianceEngine Class Reference

Inherits SystemIDisposable.

Static Public Member Functions

static ErrorCode Initialize (string compliance_resource_folder_path, string compliance_engine_unlockcode)
 Initialize compliance engine. More...
 
static void Release ()
 Release compliance engine. More...
 
static void SetLanguage (string language)
 Set language for compliance engine. More...
 
static void SetTempFolderPath (string 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 Foxti PDF SDK has been initialized successfully by function common.Library.Initialize with a key including "Compliance" module.

See also
foxit.common.Library

Member Function Documentation

◆ Initialize()

static ErrorCode foxit.addon.compliance.ComplianceEngine.Initialize ( string  compliance_resource_folder_path,
string  compliance_engine_unlockcode 
)
inlinestatic

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
foxit.common.ErrorCode.e_ErrSuccess means success.
foxit.common.ErrorCode.e_ErrNoComplianceModuleRight means Foxit PDF SDK has not been initialized with a key including "Compliance" module.
foxit.common.ErrorCode.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.
foxit.common.ErrorCode.e_ErrFilePathNotExist means parameter compliance_resource_folder_path does not exist or no library for compliance engine can be found under this folder.
foxit.common.ErrorCode.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 foxit.common.ErrorCode.e_ErrSuccess .
Note
If module "Compliance" is not defined in the license information which is used in function common.Library.Initialize , that means user has no right in using XFA related functions and this constructor will throw exception foxit.common.ErrorCode.e_ErrNoComplianceModuleRight .

◆ Release()

static void foxit.addon.compliance.ComplianceEngine.Release ( )
inlinestatic

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.

◆ SetLanguage()

static void foxit.addon.compliance.ComplianceEngine.SetLanguage ( string  language)
inlinestatic

Set language for compliance engine.

Setting a language to compliance engine will have affect on all the strings which are returned with foxit.addon.compliance.ResultInformation or through callback class foxit.addon.compliance.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()

static void foxit.addon.compliance.ComplianceEngine.SetTempFolderPath ( string  temp_folder_path)
inlinestatic

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.