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

Static Public Member Functions

static int 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) throws com.foxit.sdk.PDFException
 Set language for compliance engine.
More...
 
static void setTempFolderPath (String temp_folder_path) throws com.foxit.sdk.PDFException
 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
com.foxit.sdk.common.Library

Member Function Documentation

◆ initialize()

static int com.foxit.sdk.addon.compliance.ComplianceEngine.initialize ( String  compliance_resource_folder_path,
String  compliance_engine_unlockcode 
)
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
com.foxit.sdk.common.Constants.e_ErrSuccess means success.
com.foxit.sdk.common.Constants.e_ErrNoComplianceModuleRight means Foxit PDF SDK has not been initialized with a key including "Compliance" module.
com.foxit.sdk.common.Constants.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.
com.foxit.sdk.common.Constants.e_ErrFilePathNotExist means parameter compliance_resource_folder_path does not exist or no library for compliance engine can be found under this folder.
com.foxit.sdk.common.Constants.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 com.foxit.sdk.common.Constants.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 com.foxit.sdk.common.Constants.e_ErrNoComplianceModuleRight .

◆ release()

static void com.foxit.sdk.addon.compliance.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.

◆ setLanguage()

static void com.foxit.sdk.addon.compliance.ComplianceEngine.setLanguage ( String  language) throws com.foxit.sdk.PDFException
static

Set language for compliance engine.

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