Foxit PDF SDK
com.foxit.sdk.addon.compliance.Preflight Class Reference
Inheritance diagram for com.foxit.sdk.addon.compliance.Preflight:
com.foxit.sdk.common.Base

Public Member Functions

 Preflight ()
 Constructor.

 
 Preflight (Preflight other)
 Constructor, with another preflight object.
More...
 
ResultInformation analyze (PreflightSettingData preflight_setting_data, ProgressCallback progress_callback) throws com.foxit.sdk.PDFException
 Analyze a PDF file.
More...
 
ResultInformation analyzeAndFixup (PreflightSettingData preflight_setting_data, ProgressCallback progress_callback) throws com.foxit.sdk.PDFException
 Analyze and fixup a PDF file.
More...
 
boolean canFixup (String item_key) throws com.foxit.sdk.PDFException
 Check whether the item key can be fixuped or not.
More...
 
synchronized void delete ()
 Clean up related C++ resources immediately. More...
 
boolean generateReport (PreflightReportSettingData preflight_report_setting_data, ProgressCallback progress_callback) throws com.foxit.sdk.PDFException
 Generate report after analyzing or fixing.
More...
 
boolean generateXMLReport (String xml_report_file_path, ProgressCallback progress_callback) throws com.foxit.sdk.PDFException
 Generate an XML report after analyzing or fixing.
More...
 
String getGroupItemComment (String key) throws com.foxit.sdk.PDFException
 Get the comment of the group item through the key.
More...
 
String getGroupItemName (String key) throws com.foxit.sdk.PDFException
 Get the name of the group item through the key.
More...
 
java.util.ArrayList< java.lang.String > getGroupNamesArray (int library_type, int operate_type) throws com.foxit.sdk.PDFException
 Get all group names array corresponding to the library type and operation type.
More...
 
java.util.ArrayList< java.lang.String > getItemKeysArray (String group_name) throws com.foxit.sdk.PDFException
 Get item keys array with the specific group name.
More...
 
boolean isEmpty ()
 Check whether current object is empty or not.
More...
 
void setPreflightGroupLocalCallback (PreflightGroupLocalCallback callback) throws com.foxit.sdk.PDFException
 Set a localized name and comment callback for preflight group items.
More...
 

Detailed Description

This class represents the analysis and fix-up functions that match a specified industry profile and performs checks or fix-ups.

Constructor & Destructor Documentation

◆ Preflight()

com.foxit.sdk.addon.compliance.Preflight.Preflight ( Preflight  other)

Constructor, with another preflight object.

Parameters
[in]otherAnother preflight object.

Member Function Documentation

◆ analyze()

ResultInformation com.foxit.sdk.addon.compliance.Preflight.analyze ( PreflightSettingData  preflight_setting_data,
ProgressCallback  progress_callback 
) throws com.foxit.sdk.PDFException

Analyze a PDF file.

Parameters
[in]preflight_setting_dataThe preflight setting data.
[in]progress_callbackA ProgressCallback object which is implemented by user and can be used to get progress data.
Returns
A ResultInformation object.

◆ analyzeAndFixup()

ResultInformation com.foxit.sdk.addon.compliance.Preflight.analyzeAndFixup ( PreflightSettingData  preflight_setting_data,
ProgressCallback  progress_callback 
) throws com.foxit.sdk.PDFException

Analyze and fixup a PDF file.

Parameters
[in]preflight_setting_dataThe preflight setting data.
[in]progress_callbackA ProgressCallback object which is implemented by user and can be used to get progress data.
Returns
A ResultInformation object.

◆ canFixup()

boolean com.foxit.sdk.addon.compliance.Preflight.canFixup ( String  item_key) throws com.foxit.sdk.PDFException

Check whether the item key can be fixuped or not.

Parameters
[in]item_keyThe item key. It can be retrieved by Preflight.getItemKeysArray .
Returns
true means can be fixuped, while false means can not be fixuped.

◆ delete()

synchronized void com.foxit.sdk.addon.compliance.Preflight.delete ( )

Clean up related C++ resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

Reimplemented from com.foxit.sdk.common.Base.

◆ generateReport()

boolean com.foxit.sdk.addon.compliance.Preflight.generateReport ( PreflightReportSettingData  preflight_report_setting_data,
ProgressCallback  progress_callback 
) throws com.foxit.sdk.PDFException

Generate report after analyzing or fixing.

This should be called after Preflight.analyze or Preflight.analyzeAndFixup .

Parameters
[in]preflight_report_setting_dataThe preflight report setting data.
[in]progress_callbackA ProgressCallback object which is implemented by user and can be used to get progress data.
Returns
true means success, while false means failure.

◆ generateXMLReport()

boolean com.foxit.sdk.addon.compliance.Preflight.generateXMLReport ( String  xml_report_file_path,
ProgressCallback  progress_callback 
) throws com.foxit.sdk.PDFException

Generate an XML report after analyzing or fixing.

This should be called after Preflight.analyze or Preflight.analyzeAndFixup .

Parameters
[in]xml_report_file_pathA complete path for saving the XML report file. This should not be an empty string.
[in]progress_callbackA ProgressCallback object which is implemented by user and can be used to get progress data. This can be null. Default value: null.
Returns
true means success, while false means failure.

◆ getGroupItemComment()

String com.foxit.sdk.addon.compliance.Preflight.getGroupItemComment ( String  key) throws com.foxit.sdk.PDFException

Get the comment of the group item through the key.

Only English is available, and other languages need to reference the translated XML to get it by themselves.

Parameters
[in]keythe key of group item.
Returns
The comment of the group item obtained through the Preflight.getGroupNamesArray and Preflight.getItemKeysArray interface.

◆ getGroupItemName()

String com.foxit.sdk.addon.compliance.Preflight.getGroupItemName ( String  key) throws com.foxit.sdk.PDFException

Get the name of the group item through the key.

Only English is available, and other languages need to reference the translated XML to get it by themselves.

Parameters
[in]keythe key of group item.
Returns
The name of the group item obtained through the Preflight.getGroupNamesArray and Preflight.getItemKeysArray interface.

◆ getGroupNamesArray()

java.util.ArrayList< java.lang.String > com.foxit.sdk.addon.compliance.Preflight.getGroupNamesArray ( int  library_type,
int  operate_type 
) throws com.foxit.sdk.PDFException

Get all group names array corresponding to the library type and operation type.

Parameters
[in]library_typeThe library type. Please refer to values starting from com.foxit.sdk.addon.compliance.PreflightSettingData.e_LibraryTypeFoxit and this should be one of these values.
[in]operate_typeThe operate type. Please refer to values starting from com.foxit.sdk.addon.compliance.PreflightSettingData.e_OperateTypeProfiles and this should be one of these values.
Returns
The group names array.

◆ getItemKeysArray()

java.util.ArrayList< java.lang.String > com.foxit.sdk.addon.compliance.Preflight.getItemKeysArray ( String  group_name) throws com.foxit.sdk.PDFException

Get item keys array with the specific group name.

Parameters
[in]group_nameThe group name which can obtain from the function Preflight.getGroupNamesArray .
Returns
The item keys array.

◆ isEmpty()

boolean com.foxit.sdk.addon.compliance.Preflight.isEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ setPreflightGroupLocalCallback()

void com.foxit.sdk.addon.compliance.Preflight.setPreflightGroupLocalCallback ( PreflightGroupLocalCallback  callback) throws com.foxit.sdk.PDFException

Set a localized name and comment callback for preflight group items.

This callback is used by Preflight.getGroupItemName and Preflight.getGroupItemComment to provide localized names and comments for group items. When a localized string for a given key is available from the callback, it will be used; otherwise, the default library string will be used.

Parameters
[in]callbackA PreflightGroupLocalCallback callback object that provides localized names and comments.
Returns
None.