Foxit PDF SDK

Public Types | Static Public Member Functions | List of all members
foxit.addon.compliance.ComplianceEngine Class Reference

Inherits SystemIDisposable.

## Public Types
enum | ViewOrPrintCondition { ViewOrPrintCondition.e_ViewOrPrintConditionAuto = 0, ViewOrPrintCondition.e_ViewOrPrintConditionCoatedGRACoL2006 = 1, ViewOrPrintCondition.e_ViewOrPrintConditionISOCoatedv2ECI = 2, ViewOrPrintCondition.e_ViewOrPrintConditionJapanColor2001Coated = 3, ViewOrPrintCondition.e_ViewOrPrintConditionPSOCoatedv3ECI = 4 }
| Enumeration for viewing or printing condition. More...

## Static Public Member Functions
static void | EnableHandleTransparency (bool enable_handle_transparency)
| Set a flag to decide whether to enable transparency handling. More...
static ErrorCode | Initialize (string compliance_resource_folder_path, string compliance_engine_unlockcode)
| Initialize compliance engine. More...
static ErrorCode | InitializeThreadContext ()
| Initialize compliance context for a new thread. More...
static void | Release ()
| Release compliance engine. More...
static void | ReleaseThreadContext ()
| Release compliance context of the thread. More...
static void | SetLanguage (string language)
| Set language for compliance engine. More...
static void | SetTempFolderPath (string temp_folder_path)
| Set the temporary 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 common.Library.Initialize with a key including "Compliance" module.

See also
  foxit.common.Library

## Member Enumeration Documentation

## ◆ ViewOrPrintCondition

enum foxit.addon.compliance.ComplianceEngine.ViewOrPrintCondition
| strong

Enumeration for viewing or printing condition.

Values of this enumeration should be used alone.

Enumerator
e_ViewOrPrintConditionAuto | Viewing or printing condition: Auto.
e_ViewOrPrintConditionCoatedGRACoL2006 | Viewing or printing condition:Coated GRACoL 2006.
e_ViewOrPrintConditionISOCoatedv2ECI | Viewing or printing condition:ISO Coated v2 (ECI).
e_ViewOrPrintConditionJapanColor2001Coated | Viewing or printing condition:Japan Color 2001 Coated.
e_ViewOrPrintConditionPSOCoatedv3ECI | Viewing or printing condition: PSO Coated v3 (ECI).

## Member Function Documentation

## ◆ EnableHandleTransparency()

static void foxit.addon.compliance.ComplianceEngine.EnableHandleTransparency | ( | bool | enable_handle_transparency | ) |
| inline static

Set a flag to decide whether to enable transparency handling.

Parameters

  [in] | enable_handle_transparency | true means that transparency handling is enabled, which detects and removes transparency from graphical objects during conversion. false means it is disabled. Default value: false.

Returns
  None.

## ◆ Initialize()

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

Initialize compliance engine.

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

Parameters

  [in] | compliance_resource_folder_path | A complete path to compliance resource folder. This should not be an empty string.
  [in] | compliance_engine_unlockcode | The 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 compliance related functions and this constructor will throw exception foxit.common.ErrorCode.e_ErrNoComplianceModuleRight .

## ◆ InitializeThreadContext()

static ErrorCode foxit.addon.compliance.ComplianceEngine.InitializeThreadContext | ( |  | ) |
| inline 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
  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_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 compliance related functions and this function will throw exception foxit.common.ErrorCode.e_ErrNoComplianceModuleRight .

## ◆ Release()

static void foxit.addon.compliance.ComplianceEngine.Release | ( |  | ) |
| inline 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()

static void foxit.addon.compliance.ComplianceEngine.ReleaseThreadContext | ( |  | ) |
| inline 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 compliance.ComplianceEngine.InitializeThreadContext .

Returns
  None.

## ◆ SetLanguage()

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

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] | language | Language 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 | ) |
| inline static

Set the temporary folder for compliance engine.

The compliance engine may generate temporary files during processing (e.g., for verification or conversion tasks). This function allows specifying a custom storage location. If not set, a default temporary folder will be created in the application's root directory and used for temporary files.

Parameters

  [in] | temp_folder_path | Complete path to the temporary directory. This should be a valid path and should not be an empty string.

Returns
  None.