GetSignatureFieldCount

Security and signatures, form fields

Description

Returns the number of form fields in the document that are signature fields. The result is 0 when no document is open or the document has no signature fields.

Syntax

Delphi

Function TPDFlib.GetSignatureFieldCount: Integer;

Parameters

This function takes no parameters.

Return values

The number of fields in the document's interactive form whose type is ftSignature, counted over the whole form and not just the current page. The result is 0 when no document is open, when the document carries no form data at all, or when none of its fields is a signature field, so a zero cannot be told apart from a form that simply has no signatures.

Remarks

Every field of the form is classified with GetFormFieldType, which means signed and unsigned signature fields count alike, and a signature field whose widget sits on several pages is still one field. The count is read from the form at call time, so fields created earlier in the same session are included without saving and reloading. The value also bounds GetSignatureFieldInfo, which numbers signature fields densely from 1 in the same document order, so iterate 1..result to visit them all.