Foxit PDF SDK

Public Member Functions | List of all members
com.foxit.sdk.pdf.AnnotationSummary Class Reference
Inheritance diagram for com.foxit.sdk.pdf.AnnotationSummary:

## Public Member Functions
| AnnotationSummary (AnnotationSummary other)
| Constructor, with another annotation summary object. More...
| AnnotationSummary (PDFDoc document) throws com.foxit.sdk.PDFException
| Constructor. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
boolean | isEmpty ()
| Check whether current object is empty or not. More...
void | setCallback (AnnotationSummaryCallback callback) throws com.foxit.sdk.PDFException
| Set a callback object for annotation summary. More...
Progressive | startSummarize (FileWriterCallback dest_file, AnnotationSummarySettings settings, PauseCallback pause) throws com.foxit.sdk.PDFException
| Start to summarize annotation. More...
Progressive | startSummarize (String dest_file_path, AnnotationSummarySettings settings, PauseCallback pause) throws com.foxit.sdk.PDFException
| Start to summarize annotation. More...

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ AnnotationSummary() [1/2]

com.foxit.sdk.pdf.AnnotationSummary.AnnotationSummary | ( | PDFDoc | document | ) | throws com.foxit.sdk.PDFException

Constructor.

Parameters

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

## ◆ AnnotationSummary() [2/2]

com.foxit.sdk.pdf.AnnotationSummary.AnnotationSummary | ( | AnnotationSummary | other | ) |

Constructor, with another annotation summary object.

Parameters

  [in] | other | Another annotation summary object.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.pdf.AnnotationSummary.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.

## ◆ isEmpty()

boolean com.foxit.sdk.pdf.AnnotationSummary.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.

## ◆ setCallback()

void com.foxit.sdk.pdf.AnnotationSummary.setCallback | ( | AnnotationSummaryCallback | callback | ) | throws com.foxit.sdk.PDFException

Set a callback object for annotation summary.

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

Parameters

  [in] | callback | A AnnotationSummaryCallback 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 null, that means to use default information/data.

Returns
  None.

## ◆ startSummarize() [1/2]

Progressive com.foxit.sdk.pdf.AnnotationSummary.startSummarize | ( | FileWriterCallback | dest_file,
|  | AnnotationSummarySettings | settings,
|  | PauseCallback | pause
| ) |  | throws com.foxit.sdk.PDFException

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 AnnotationSummarySettings.setAnnotType ), or related source PDF document does not have any annotation, this function will throw exception com.foxit.sdk.common.Constants.e_ErrUnknown .

Parameters

  [in] | dest_file | A com.foxit.sdk.common.fxcrt.FileWriterCallback 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 null which means not to pause during the parsing process. If this is not null, it should be a valid pause object implemented by user. Default value: null.

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

## ◆ startSummarize() [2/2]

Progressive com.foxit.sdk.pdf.AnnotationSummary.startSummarize | ( | String | dest_file_path,
|  | AnnotationSummarySettings | settings,
|  | PauseCallback | pause
| ) |  | throws com.foxit.sdk.PDFException

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 AnnotationSummarySettings.setAnnotType ), or related source PDF document does not have any annotation, this function will throw exception com.foxit.sdk.common.Constants.e_ErrUnknown .

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 null which means not to pause during the parsing process. If this is not null, it should be a valid pause object implemented by user. Default value: null.

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