Foxit PDF SDK

Instance Methods | List of all members
FSAnnotationSummary Class Reference
Inheritance diagram for FSAnnotationSummary:

## Instance Methods
(id) | - initWithDocument:
| Constructor. More...
(id) | - initWithOther:
| Constructor, with another annotation summary object. More...
(BOOL) | - isEmpty
| Check whether current object is empty or not. More...
(void) | - setCallback:
| Set a callback object for annotation summary. More...
(FSProgressive *) | - startSummarize:settings:pause:
| Start to summarize annotation. More...
(FSProgressive *) | - startSummarizeWithWriterCallback:settings:pause:
| Start to summarize annotation. More...

## Detailed Description

This class can be used to summarize annotation and genearte a PDF file as the result document.

## Method Documentation

## ◆ initWithDocument:()

- (id) initWithDocument: |  | (FSPDFDoc*) | document |

Constructor.

Parameters

  [in] | document | A valid PDF document. It should has been loaded successfully.

## ◆ initWithOther:()

- (id) initWithOther: |  | (FSAnnotationSummary*) | other |

Constructor, with another annotation summary object.

Parameters

  [in] | other | Another annotation summary 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.

## ◆ setCallback:()

- (void) setCallback: |  | (id<FSAnnotationSummaryCallback>) | callback |

Set a callback object for annotation summary.

If this function is not called, that means no callback will be used.

Parameters

  [in] | callback | A object which is implemented by user. User can change some information/data during summarizing annotations by this callback. Please ensure that the callback object keeps valid until the life-cycle of current AnnotationSummary object ends. If this is nil, that means to use default information/data.

Returns
  None.

## ◆ startSummarize:settings:pause:()

- (FSProgressive *) startSummarize: |  | (NSString *) | dest_file_path
settings: |  | (FSAnnotationSummarySettings*) | settings
pause: |  | (id<FSPauseCallback>) | pause

Start to summarize annotation.

It may take a long time to summarize annotation, so Foxit PDF SDK uses a progressive process to do this. If related source PDF document does not have any annotation whose type is supported (please refer to comment of function FSAnnotationSummarySettings::setAnnotType:use_all:), or related source PDF document does not have any annotation, this function will throw exception FSErrUnknown.

Parameters

  [in] | dest_file_path | A full path to save a PDF file as the result of annotation summary. This should not be an empty string.
  [in] | settings | Setting data used to summarize annotation.
  [in] | pause | Pause object which decides if the summarizing process needs to be paused. This can be nil which means not to pause during the parsing process. If this is not nil, it should be a valid pause object implemented by user. Default value: nil.

Returns
  A progressive object. Please check the rate of current progress by function FSProgressive::getRateOfProgress. If the rate is not 100 yet, call function FSProgressive::resume to continue the progress until the progress is finished.

## ◆ startSummarizeWithWriterCallback:settings:pause:()

- (FSProgressive *) startSummarizeWithWriterCallback: |  | (id<FSFileWriterCallback>) | dest_file
settings: |  | (FSAnnotationSummarySettings*) | settings
pause: |  | (id<FSPauseCallback>) | pause

Start to summarize annotation.

It may take a long time to summarize annotation, so Foxit PDF SDK uses a progressive process to do this. If related source PDF document does not have any annotation whose type is supported (please refer to comment of function FSAnnotationSummarySettings::setAnnotType:use_all:), or related source PDF document does not have any annotation, this function will throw exception FSErrUnknown.

Parameters

  [in] | dest_file | A FSFileWriterCallback object which is implemented by user to store the data of annotation summary to a PDF file as result in custom method.
  [in] | settings | Setting data used to summarize annotation.
  [in] | pause | Pause object which decides if the summarizing process needs to be paused. This can be nil which means not to pause during the parsing process. If this is not nil, it should be a valid pause object implemented by user. Default value: nil.

Returns
  A progressive object. Please check the rate of current progress by function FSProgressive::getRateOfProgress. If the rate is not 100 yet, call function FSProgressive::resume to continue the progress until the progress is finished.