Click or drag to resize
Pdftools logo

SignerSignPreparedSignature Method

Sign a prepared signature

Sign a document that contains a prepared signature created using AddPreparedSignature(Document, SignatureConfiguration, Stream, OutputOptions). Note that the configuration must be compatible to the configuration used when preparing the signature.

Namespace: PdfTools.Sign
Assembly: PdfTools (in PdfTools.dll) Version: 1.7.0+cfcc11b476b3e1eb4320f0f37269191f64e36bd8
Syntax
C#
public Document SignPreparedSignature(
	Document document,
	SignatureConfiguration configuration,
	Stream stream
)

Parameters

document  Document
The input document to sign
configuration  SignatureConfiguration
The signature configuration
stream  Stream
The stream where the signed document is written

Return Value

Document
Exceptions
ExceptionCondition
LicenseExceptionThe license check has failed.
IOExceptionWriting to the stream failed.
ArgumentExceptionIf the document does not contain a prepared signature created by AddPreparedSignature(Document, SignatureConfiguration, Stream, OutputOptions)
ArgumentExceptionIf the configuration is invalid, e.g. because the creating provider has been closed.
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