Click or drag to resize

PdfSignatureFieldTimestamp Method

Initiate timestamping of a PDF file using the specified PdfTimestamper that does the actual timestamping.

The length of the timestamp token returned by the timestamper must be less than EstimatedTimestampTokenLength.

The name of the preferred signature handler to use when validating the signature (Filter entry) is Adobe.PPKLite, the Format of the returned PdfSignature instance is RFC3161 and the ContentsLength is EstimatedTimestampTokenLength bytes.

To finish the timestamping, call any of the Save. Next signing or timestamping cannot be initiated before the current one is not finished.


Namespace: SautinSoft.Pdf.Forms
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2025.3.13
Syntax
public PdfSignature Timestamp(
	PdfTimestamper timestamper
)

Parameters

timestamper  PdfTimestamper
The timestamper whose GetTimestampToken(Stream) method is called when saving the PDF file that takes the PDF file stream (without Content entry) as an input and returns the timestamp token that will be set as the value of the Content entry.

Return Value

PdfSignature
A PdfSignature instance that will contain TimeStampToken as specified in RFC 3161 as updated by RFC 5816. The value of the messageImprint field within the TimeStampToken shall be a hash of the bytes of the document indicated by the ByteRange and the ByteRange shall specify the complete PDF file contents (excepting the Content value).
Exceptions
ExceptionCondition
ArgumentNullExceptiontimestamper is .
InvalidOperationExceptionThis PdfSignatureField is not contained in the Fields of this PDF document. -or- Signing/timestamping of the PDF file has already been initiated on some PdfSignatureField in this PDF document. Finish that signing/timestamping by calling any of the Save before initiating a new signing/timestamping on this PdfSignatureField.
See Also