Click or drag to resize
Pdftools logo

SignerAddTimestamp Method

Add a document time-stamp

This type of signature provides evidence that the document existed at a specific time and protects the document’s integrity.

The features and format of the signature are defined by the Provider and the configuration.

Non-critical processing errors raise a Warning. It is recommended to review the WarningCategory and handle them if necessary for the application.


Namespace: PdfTools.Sign
Assembly: PdfTools (in PdfTools.dll) Version: 1.6.0+e1db8f4bf6125495a2d29513486ea3e61205c81b
Syntax
C#
public Document AddTimestamp(
	Document document,
	TimestampConfiguration configuration,
	Stream stream,
	OutputOptions outputOptions = null
)

Parameters

document  Document
The input document to add a time-stamp to
configuration  TimestampConfiguration
The time-stamp configuration
stream  Stream
The stream where the output document is written
outputOptions  OutputOptions  (Optional)
Document-level output options not directly related to the document time-stamp

Return Value

Document
Exceptions
ExceptionCondition
LicenseExceptionThe license check has failed.
IOExceptionWriting to the stream failed.
UnsupportedFeatureExceptionThe input PDF contains unrendered XFA form fields. See Xfa for more information on how to detect and handle XFA documents.
ArgumentExceptionIf the configuration is invalid, e.g. because the creating provider has been closed.
NotFoundExceptionIf the FieldName does not exist in document.
RetryExceptionIf an unexpected error occurs that can be resolved by retrying the operation. For example, if a signature service returns an unexpectedly large signature.
RetryExceptionIf a resource required by the cryptographic provider is temporarily unavailable.
HttpExceptionIf a network error occurs, e.g. downloading revocation information (OCSP, CRL) or a time-stamp.
UnsupportedFeatureExceptionIf the cryptographic provider does not support the requested signing algorithm.
PermissionExceptionIf the cryptographic provider does not allow the signing operation.
ArgumentNullExceptionif document is .
ArgumentNullExceptionif configuration is .
ArgumentNullExceptionif stream is .
See Also