Foxit PDF SDK
foxit::addon::compliance::Preflight Class Reference
Inheritance diagram for foxit::addon::compliance::Preflight:
foxit::Base

Public Member Functions

 Preflight ()
 Constructor.
 
 Preflight (const Preflight &other)
 Constructor, with another preflight object. More...
 
 ~Preflight ()
 Destructor.
 
ResultInformation Analyze (const PreflightSettingData &preflight_setting_data, ProgressCallback *progress_callback=0)
 Analyze a PDF file. More...
 
ResultInformation AnalyzeAndFixup (const PreflightSettingData &preflight_setting_data, ProgressCallback *progress_callback=0)
 Analyze and fixup a PDF file. More...
 
bool CanFixup (const String &item_key)
 Check whether the item key can be fixuped or not. More...
 
bool GenerateReport (const PreflightReportSettingData &preflight_report_setting_data, ProgressCallback *progress_callback=0)
 Generate report after analyzing or fixing. More...
 
bool GenerateXMLReport (const wchar_t *xml_report_file_path, ProgressCallback *progress_callback=0)
 Generate an XML report after analyzing or fixing. More...
 
WString GetGroupItemComment (const String &key)
 Get the comment of the group item through the key. More...
 
WString GetGroupItemName (const String &key)
 Get the name of the group item through the key. More...
 
StringArray GetGroupNamesArray (const PreflightSettingData::LibraryType &library_type, const PreflightSettingData::OperateType &operate_type)
 Get all group names array corresponding to the library type and operation type. More...
 
StringArray GetItemKeysArray (const String &group_name)
 Get item keys array with the specific group name. More...
 
bool IsEmpty () const
 Check whether current object is empty or not. More...
 
bool operator != (const Preflight &other) const
 Not equal operator. More...
 
Preflight & operator= (const Preflight &other)
 Assign operator. More...
 
bool operator== (const Preflight &other) const
 Equal operator. More...
 
void SetPreflightGroupLocalCallback (PreflightGroupLocalCallback *callback)
 Set a localized name and comment callback for preflight group items. More...
 
- Public Member Functions inherited from foxit::Base
FS_HANDLE Handle () const
 Get the handle of current object. 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()

foxit::addon::compliance::Preflight::Preflight ( const Preflight &  other)

Constructor, with another preflight object.

Parameters
[in]otherAnother preflight object.

Member Function Documentation

◆ Analyze()

ResultInformation foxit::addon::compliance::Preflight::Analyze ( const PreflightSettingData &  preflight_setting_data,
ProgressCallback *  progress_callback = 0 
)

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 foxit::addon::compliance::Preflight::AnalyzeAndFixup ( const PreflightSettingData &  preflight_setting_data,
ProgressCallback *  progress_callback = 0 
)

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()

bool foxit::addon::compliance::Preflight::CanFixup ( const String &  item_key)

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.

◆ GenerateReport()

bool foxit::addon::compliance::Preflight::GenerateReport ( const PreflightReportSettingData &  preflight_report_setting_data,
ProgressCallback *  progress_callback = 0 
)

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()

bool foxit::addon::compliance::Preflight::GenerateXMLReport ( const wchar_t *  xml_report_file_path,
ProgressCallback *  progress_callback = 0 
)

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()

WString foxit::addon::compliance::Preflight::GetGroupItemComment ( const String &  key)

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()

WString foxit::addon::compliance::Preflight::GetGroupItemName ( const String &  key)

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()

StringArray foxit::addon::compliance::Preflight::GetGroupNamesArray ( const PreflightSettingData::LibraryType &  library_type,
const PreflightSettingData::OperateType &  operate_type 
)

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 PreflightSettingData::e_LibraryTypeFoxit and this should be one of these values.
[in]operate_typeThe operate type. Please refer to values starting from PreflightSettingData::e_OperateTypeProfiles and this should be one of these values.
Returns
The group names array.

◆ GetItemKeysArray()

StringArray foxit::addon::compliance::Preflight::GetItemKeysArray ( const String &  group_name)

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()

bool foxit::addon::compliance::Preflight::IsEmpty ( ) const

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.

◆ operator !=()

bool foxit::addon::compliance::Preflight::operator != ( const Preflight &  other) const

Not equal operator.

Parameters
[in]otherAnother preflight object. This function will check if current object is not equal to this one.
Returns
true means not equal, while false means equal.

◆ operator=()

Preflight& foxit::addon::compliance::Preflight::operator= ( const Preflight &  other)

Assign operator.

Parameters
[in]otherAnother preflight object, whose value would be assigned to current object.
Returns
Reference to current object itself.

◆ operator==()

bool foxit::addon::compliance::Preflight::operator== ( const Preflight &  other) const

Equal operator.

Parameters
[in]otherAnother preflight object. This function will check if current object is equal to this one.
Returns
true means equal, while false means not equal.

◆ SetPreflightGroupLocalCallback()

void foxit::addon::compliance::Preflight::SetPreflightGroupLocalCallback ( PreflightGroupLocalCallback *  callback)

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.