property SignatureCount: Integer; // read only
SignatureCount는 현재 문서에 존재하는 signature dictionary의 수를 반환합니다. PDFium은 AcroForm signature field(PDF 1.7 spec section 12.8)를 열거하며 — 각 항목은 /V 값이 signature dictionary(/Type /Sig)인 /Sig field에 해당하고, 그 dictionary는 /Contents hex string과 /ByteRange coverage를 포함합니다
Active가 False이거나 PDF가 아직 채워지지 않은 빈 signature placeholder만 담고 있거나, 파일이 단순히 서명되지 않은 경우 값은 0입니다. 이것은 문서 수준 count라는 점에 유의하세요. signature field는 시각적으로 어떤 page에나 배치될 수 있지만 count 자체는 전역입니다
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. PDFiumPas exposes
only inspection data; verifying the signature requires a third-party cryptography
library to validate the PKCS#7 blob against the document byte range.
n validates the state at signing time, not
necessarily the current state.SignatureCount는 SaveToFile 전후로 변하지 않습니다. 외부에서 서명한 뒤 FPDF_SaveAsCopy로 저장하면 기존 signature가 byte 단위로 그대로 보존됩니다FormFieldCount to see whether the document has
additional non-signature interactive fields.
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;