Class PdfSignatureInfo
Describes one digital signature found in a PDF document: the structural facts read from the signature dictionary, without any cryptographic verification.
public sealed class PdfSignatureInfo
- Inheritance
-
PdfSignatureInfo
- Inherited Members
Examples
using LMKit.Document.Pdf;
foreach (PdfSignatureInfo signature in PdfInfo.GetSignatures("contract.pdf"))
{
Console.WriteLine($"#{signature.Index}: {signature.SubFilter}, " +
$"signed {signature.SigningTime}, whole document: {signature.CoversEntireDocument}");
}
Remarks
Instances are returned by GetSignatures(string, string, CancellationToken). Reading them is cheap and offline; to verify a signature cryptographically, pass the document to PdfSignatureValidator.
CoversEntireDocument is a byte-range arithmetic check: the signed ranges
start at offset zero, leave a single gap (assumed to hold the signature value itself),
and end at the end of the file. A document that received incremental updates after
signing reports false, because bytes were appended beyond the signed ranges.
Properties
- ByteRange
Gets the signature's /ByteRange as pairs of (offset, length) describing the exact bytes the digest was computed over. Empty when the entry is missing.
- Certification
Gets the DocMDP permission this signature certifies, or None for an ordinary approval signature.
- CoversEntireDocument
Gets a value indicating whether the signed byte ranges span the whole file, leaving only the gap that holds the signature value itself.
falsemeans the document received changes after this signature was applied.
- Index
Gets the zero-based index of the signature in the document's signature list.
- Reason
Gets the reason for signing declared in the signature dictionary, or an empty string when none was recorded.
- SigningTime
Gets the claimed signing time parsed from SigningTimeRaw, or
nullwhen the entry is missing or malformed. This is the time the signer declared, not a cryptographically proven timestamp.
- SigningTimeRaw
Gets the claimed signing time from the signature dictionary's /M entry, as the raw PDF date string (for example
D:20260827143000+02'00'), or an empty string when none was recorded.
- SubFilter
Gets the signature's /SubFilter name, which identifies the signature container format (for example
ETSI.CAdES.detachedoradbe.pkcs7.detached). Empty when the entry is missing.