Click or drag to resize
Pdftools logo

SignerCertify Method

Add a document certification signature

This type of signature lets you detect rejected changes specified by the author. These signatures are also called Modification Detection and Prevention (MDP) signatures. The allowed permissions are defined by permissions.

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.7.0+cfcc11b476b3e1eb4320f0f37269191f64e36bd8
Syntax
C#
public Document Certify(
	Document document,
	SignatureConfiguration configuration,
	Stream stream,
	MdpPermissionOptions permissions = null,
	OutputOptions outputOptions = null
)

Parameters

document  Document
The input document to certify
configuration  SignatureConfiguration
The signature configuration
stream  Stream
The stream where the certified document is written
permissions  MdpPermissionOptions  (Optional)
The permissions allowed. The default is NoChanges.
outputOptions  OutputOptions  (Optional)
Document-level output options not directly related to the document certification

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