| SignDocDocumentaddSignature Method |
Sign the document.
This function stores changed properties in the document before
signing. If the string parameter "OutputPath" is set, the
document will be stored in a new file specified by that
parameter. If string parameter "TemporaryDirectory" is set (and
"OutputPath" is not set), the document will be stored in a new
temporary file. Use getPathname() to obtain the pathname of that
temporary file. In either case, the original file won't be
modified (however, it will be deleted if it is a temporary file,
ie, if "TemporaryDirectory" was used). If neither "OutputPath"
nor "TemporaryDirectory" is set, the document will be written to
the file from which it was loaded or to which it was most
recently saved.
Some document types may allow adding signatures only if all signatures
of the documents are valid.
For PDF documents, this function either signs or certifies the
document, see integer parameter DocMDP.
If you are using RFC 3161 timestamps and get error rc_unexpected_error
with a message like "Contents overflow: xxx vs. yyy", try using a
bigger value for integer parameter "TimeStampSize".
This function performs a basic verification of the signature after
signing a PDF document unless #DontVerifyAfterSigning is set.
This ensures that the private key matches the certificate.
If that verification fails, SignDocInvalidSignatureException
will be thrown.
Namespace:
de.softpro.signdocsdk
Assembly:
SPSignDoc_4.3_DotNetLib (in SPSignDoc_4.3_DotNetLib.dll) Version: 1.0.6773.37566
Syntaxpublic void addSignature(
SignDocSignatureParameters signatureParameters,
SignDocVerificationParameters verificationParameters
)
Parameters
- signatureParameters
- Type: de.softpro.signdocsdkSignDocSignatureParameters
The signing parameters. The parameters
can be used only once, for a single signature. - verificationParameters
- Type: de.softpro.signdocsdkSignDocVerificationParameters
Verification parameters or null
for default parameters.
If revocation checking is enabled in
aVerificationParameters, the revocation state
of the certificates(subject to integer
parameter "VerificationModel")
in both the signing certificate's certificate
chain and(if RFC 3161 time stamps are enabled)
he RFC 3161 time stamp's certificate chain
is checked.
These verification parameters are not used
for verifying the certificate chain of
HTTPS connections to RFC 3161 time - stamp
servers.
Remarks Currently, using string parameter "OutputPath" for the
second or subsequent signature of a PDF document will break
existing signatures.
See Also