Foxit PDF SDK
FSPreflight Class Reference
Inheritance diagram for FSPreflight:
FSBase

Instance Methods

(FSResultInformation *) - analyze:progress_callback:
 Analyze a PDF file.
More...
 
(FSResultInformation *) - analyzeAndFixup:progress_callback:
 Analyze and fixup a PDF file.
More...
 
(BOOL) - canFixup:
 Check whether the item key can be fixuped or not.
More...
 
(BOOL) - generateReport:progress_callback:
 Generate report after analyzing or fixing.
More...
 
(BOOL) - generateXMLReport:progress_callback:
 Generate an XML report after analyzing or fixing.
More...
 
(NSString *) - getGroupItemComment:
 Get the comment of the group item through the key.
More...
 
(NSString *) - getGroupItemName:
 Get the name of the group item through the key.
More...
 
(NSArray< NSData * > *) - getGroupNamesArray:operate_type:
 Get all group names array corresponding to the library type and operation type.
More...
 
(NSArray< NSData * > *) - getItemKeysArray:
 Get item keys array with the specific group name.
More...
 
(id) - init
 Constructor.

 
(id) - initWithOther:
 Constructor, with another preflight object.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 
(void) - setPreflightGroupLocalCallback:
 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.

Method Documentation

◆ analyze:progress_callback:()

- (FSResultInformation *) analyze: (FSPreflightSettingData*)  preflight_setting_data
progress_callback: (id<FSComplianceProgressCallback>)  progress_callback 

Analyze a PDF file.

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

◆ analyzeAndFixup:progress_callback:()

- (FSResultInformation *) analyzeAndFixup: (FSPreflightSettingData*)  preflight_setting_data
progress_callback: (id<FSComplianceProgressCallback>)  progress_callback 

Analyze and fixup a PDF file.

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

◆ canFixup:()

- (BOOL) canFixup: (NSString *)  item_key

Check whether the item key can be fixuped or not.

Parameters
[in]item_keyThe item key. It can be retrieved by FSPreflight::getItemKeysArray:.
Returns
YES means can be fixuped, while NO means can not be fixuped.

◆ generateReport:progress_callback:()

- (BOOL) generateReport: (FSPreflightReportSettingData*)  preflight_report_setting_data
progress_callback: (id<FSComplianceProgressCallback>)  progress_callback 

Generate report after analyzing or fixing.

This should be called after FSPreflight::analyze:progress_callback: or FSPreflight::analyzeAndFixup:progress_callback:.

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

◆ generateXMLReport:progress_callback:()

- (BOOL) generateXMLReport: (NSString *)  xml_report_file_path
progress_callback: (id<FSComplianceProgressCallback>)  progress_callback 

Generate an XML report after analyzing or fixing.

This should be called after FSPreflight::analyze:progress_callback: or FSPreflight::analyzeAndFixup:progress_callback:.

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

◆ getGroupItemComment:()

- (NSString *) getGroupItemComment: (NSString *)  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 FSPreflight::getGroupNamesArray:operate_type: and FSPreflight::getItemKeysArray: interface.

◆ getGroupItemName:()

- (NSString *) getGroupItemName: (NSString *)  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 FSPreflight::getGroupNamesArray:operate_type: and FSPreflight::getItemKeysArray: interface.

◆ getGroupNamesArray:operate_type:()

- (NSArray< NSData * > *) getGroupNamesArray: (FSPreflightSettingDataLibraryType)  library_type
operate_type: (FSPreflightSettingDataOperateType)  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 FSPreflightSettingDataLibraryTypeFoxit and this should be one of these values.
[in]operate_typeThe operate type. Please refer to values starting from FSPreflightSettingDataOperateTypeProfiles and this should be one of these values.
Returns
The group names array.

◆ getItemKeysArray:()

- (NSArray< NSData * > *) getItemKeysArray: (NSString *)  group_name

Get item keys array with the specific group name.

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

◆ initWithOther:()

- (id) initWithOther: (FSPreflight*)  other

Constructor, with another preflight object.

Parameters
[in]otherAnother preflight object.

◆ isEmpty()

- (BOOL) isEmpty

Check whether current object is empty or not.

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

Returns
YES means current object is empty, while NO means not.

◆ setPreflightGroupLocalCallback:()

- (void) setPreflightGroupLocalCallback: (id<FSPreflightGroupLocalCallback>)  callback

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

This callback is used by FSPreflight::getGroupItemName: and FSPreflight::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 callback object that provides localized names and comments.
Returns
None.