Docs PDFiumVCL

SignatureCount property

Questa voce API conserva identificatori, firme, blocchi di codice e termini PDF nella forma originale.
Component: TPdf  ·  Unit: PDFium
Number of digital signature fields embedded in the document.

Syntax

property SignatureCount: Integer; // read only

Description

SignatureCount returns the number of signature dictionaries currently present in the document. PDFium enumerates AcroForm signature fields (PDF 1.7 spec section 12.8) — each entry corresponds to a /Sig field whose /V value is a signature dictionary (/Type /Sig) carrying the /Contents hex string and /ByteRange coverage.

The value is 0 when Active is False, when the PDF carries only empty signature placeholders that have not been filled yet, or when the file simply was not signed. Note that this is a document-level count: signature fields can be visually placed on any page but the count itself is global.

Use Signature[Index] to retrieve a single TPdfSignature record containing the raw PKCS#7 Content bytes, the Encoding string (adbe.pkcs7.detached, ETSI.CAdES.detached, etc.), the signer-supplied Reason / Time strings and the Permission level. PDFiumVCL exposes only inspection data; verifying the signature requires a third-party cryptography library to validate the PKCS#7 blob against the document byte range.

Remarks

Example

var I: Integer;
var Sig: TPdfSignature;
for I := 0 to Pdf1.SignatureCount - 1 do
begin
  Sig := Pdf1.Signature[I];
  Memo1.Lines.Add(Format('Signer reason: %s, time: %s',
    [Sig.Reason, Sig.Time]));
end;

See Also

Signature, FormFieldCount, FormType