AddFingerprint

Creates a fingerprint for the current source page.

Syntax

bool AddFingerprint()

Parameters

None

Returns

False if the rule with this action is not bound to a Page object of the Document Hierarchy; if the current page does not have an Image file; if a CCO fingerprint file has not been created or if the fingerprint's two files cannot be created in the fingerprint directory. Otherwise, True.

Level

Page level only.

Details

Unconditionally adds the current fingerprint for the current source page to the fingerprint directory for future fingerprint matching.

The fingerprint will be associated with the global host fingerprint class ID. If the new fingerprint must be associated with a specific fingerprint class, then use the AddAndSetFingerprint action. The current page must have an existing Image file (.tif) and its fingerprint processing file (.cco). These files will be given a unique fingerprint template ID and added to the fingerprint database. The TIF image and the CCO file will be added to the fingerprint directory.

Upon successful completion of the action, the following variables will be created in the current page DCO:
  • "Confidence" will be created with a value of "1".
  • "TemplateID" will be set with the new ID associated with the fingerprint.
  • "Fingerprint Created" will be set to "Yes".

The resulting fingerprint will consist of two files: the page's Image file (.tif) and its Processing file (.cco).

SetFingerprintDirectory must have been called prior to this action. If using the fingerprint service, then SetFingerprintWebServiceURL must also have been previously called.

Example
SetFingerprintDirectory("@APPPATH(fingerprint)")
AnalyzeImage()
AddFingerprint()

This example configures the fingerprint directory then calls AnalyzeImage to create a fingerprint for the current page based on the page's associated TIF image. The fingerprint is then added to the current collection of fingerprints. Note that while SetFingerprintDirectory is shown in this example, it is typically called on a batch level so it is set only once. For more information, see SetFingerprintDirectory.

See also

SetFingerprintDir, SetFingerprintWebServiceURL

Refer to the top-level help for more information on using fingerprints and the fingerprint service.