SignDoc SDK (.NET without exceptions)  5.0.0
Migrating from SignDoc SDK 4.0 to SignDoc SDK 4.1

The default background color for all fields is now transparent (combo boxes, check boxes, and radio buttons had white background in SignDoc SDK 4.0). You can change the background color with de.softpro.doc.SignDocField.setBackgroundColor().

New check box fields will now use a check mark rather than a cross. You can change the button style with de.softpro.doc.SignDocField.setButtonStyle().

Signature method de.softpro.doc.SignDocSignatureParameters.SigningMethod.DigSigCadesDetached has been added, de.softpro.doc.SignDocSignatureParameters.SigningMethod.DigSigPKCS7SHA1 has been deprecated.

Please use new interface, de.softpro.doc.SignRSA instead of de.softpro.doc.SignPKCS7 as it is much simpler. See SignDocSample6.java and SignDocSampleOpenSSL3.cpp for sample code using de.softpro.doc.SignRSA.

de.softpro.doc.SignPKCS7.signDetached() and de.softpro.doc.SignPKCS7.signHash() have been merged into de.softpro.doc.SignPKCS7.sign().

de.softpro.doc.SignPKCS7.getSignHashSize() and de.softpro.doc.SignPKCS7.getSignDetachedSize() have been merged into de.softpro.doc.SignPKCS7.getSignatureSize() and parameter aTimeStamp has been removed, the size of the timestamp is no longer included. There are new hash algorithms: SHA-384 and SHA-512.

See SignDocSample5.java and SignDocSampleOpenSSL2.cpp for sample code which employs an adapter class for using an implementation of the old de.softpro.doc.SignPKCS7 interface.

The message digest passed to de.softpro.doc.TimeStamper.stamp() is no longer a hash of the document message digest; now you shall pass the document message digest directly, unhashed.

de.softpro.doc.SignDocSignatureParameters has a new integer parameter, "TimeStampSize". String parameter "TimeStampServerTrustedCertificatesPath" has been removed, the server certificate is always tested. You may have to use de.softpro.doc.SignDocDocumentLoader.loadTrustedCertificatesFromFile().

PEM format is now accepted for blob parameters "Certificate" and "CertificatePrivateKey".

de.softpro.doc.SignDocSignatureParameters.setRSA() has been added.

de.softpro.doc.SignDocSignatureParameters has new string parameters, "SelectCertificateMessage" and "SelectCertificateTitle".

de.softpro.doc.SignDocVerificationResult.verifyCertificateChain(), de.softpro.doc.SignDocVerificationResult.verifyCertificateSimplified(), de.softpro.doc.SignDocVerificationResult.verifyTimeStampCertificateChain(), and de.softpro.doc.SignDocVerificationResult.verifyTimeStampCertificateSimplified() now have a single argument for specifying all the verification parameters.

Revocation checking is now implemented; de.softpro.doc.SignDocVerificationResult.verifyCertificateRevocation() and de.softpro.doc.SignDocVerificationResult.verifyTimeStampCertificateRevocation() have been replaced by de.softpro.doc.SignDocVerificationResult.getCertificateRevocationState() and de.softpro.doc.SignDocVerificationResult.getTimeStampCertificateRevocationState(), respectively.

The revocation state of the certificates can be checked at signing time; de.softpro.doc.SignDocDocument.addSignature() now has an additional argument for passing parameters for certificate chain checking and revocation checking. The revocation information can be included in the signature, see integer parameter "AddRevocationInfo".

de.softpro.doc.SignDocDocument.renderPageAsImage() now has an additional argument for passing parameters for certificate chain checking and revocation checking, de.softpro.doc.SignDocRenderParameters.setCertificateChainVerificationPolicy() and friends have been removed.

de.softpro.doc.SignDocDocument.addSignature() now requires that a certificate chain ending in a trusted root certificate can be built for the signing certificate. Any intermediate certificates will be included in the signature. Use integer parameter "AddCertificates" to change this behavior. Better use de.softpro.doc.SignDocDocumentLoader.loadTrustedCertificatesFromFile() and ensure that all required intermediate certificates are available. See also the new blob parameter "IntermediateCertificate".

Functions de.softpro.doc.SignDocField.getSeedValueAddRevInfo() and de.softpro.doc.SignDocField.setSeedValueAddRevInfo() have been added. A new addRevInfo element has been added to PdfFields.xsd.

Functions de.softpro.doc.SignDocField.getSeedValueFilter(), de.softpro.doc.SignDocField.setSeedValueFilter() and related functions have been added. A new filter element has been added to PdfFields.xsd.

Functions de.softpro.doc.SignDocField.getSeedValueSubFilter(), de.softpro.doc.SignDocField.setSeedValueSubFilter() and related functions have been added. A new subFilter element has been added to PdfFields.xsd.

Functions de.softpro.doc.SignDocField.getSeedValueDigestMethod(), de.softpro.doc.SignDocField.setSeedValueDigestMethod() and related functions have been added. A new digestMethod element has been added to PdfFields.xsd.

There is a new value m_default for integer parameter "Method" of de.softpro.doc.SignDocSignatureParameters. That new value is the default value of that parameter. It causes the method to be chosen by the signature field seed value dictionary (SubFilter). If the document does not have a preference for a signing method, m_digsig_pkcs7_detached will be used.

There are new values, dha_sha384, dha_sha512, and dha_ripemd160 for integer parameter "DetachedHashAlgorithm" of de.softpro.doc.SignDocSignatureParameters. dha_default now causes the digest algorithm preferred by the signature field seed value dictionary (DigestMethod) to be used. If the document does not have a preference for a digest algorithm, dha_sha256 will be used.

If you set either integer parameter "%Method" or integer parameter "%DetachedHashAlgorithm" to a non-default value, signing can fail due to the document's signature field seed value dictionary not allowing the specified signing method and/or hash algorithm. Therefore, using m_default and dha_default is recommended. However, you can control that behavior with new integer parameter "%IgnoreSeedValues".

There are new values, csa_sha256_rsa, csa_sha384_rsa, csa_sha512_rsa, and csa_ripemd160_rsa for integer parameter "CertificateSigningAlgorithm" of de.softpro.doc.SignDocSignatureParameters.

There are new values, tsha_sha384, and tsha_sha512 for integer parameter "TimeStampHashAlgorithm" of de.softpro.doc.SignDocSignatureParameters. tsha_default now causes the same hash algorithm to be used as for the document hash, falling back to tsha_sha1 if that algorithm is not supported by the time stamp server.

If string parameter "Signer" of de.softpro.doc.SignDocSignatureParameters is not set, the signing certificate's common name will be used.

There are new string parameters "Text1" through "Text9" for de.softpro.doc.SignDocSignatureParameters along with appropriate constants for putting those texts into the appearance stream.

There are new value for integer parameter "TextPosition" of de.softpro.doc.SignDocSignatureParameters for putting the text above, to the left, or to the right of the image.

There is a new profile for de.softpro.doc.SignDocSignatureParameters.createSignatureParameters(): "image".

Support for PKCS #1 signatures has been improved.

"broken chain" and "untrusted root certificate" are now distinguished for OS X and iOS.

de.softpro.doc.SignDocSignatureParameters.setString() and de.softpro.doc.SignDocSignatureParameters.setBlob() now support user-defined properties which will be stored in the signature.

de.softpro.doc.SignDocVerificationResult.getSignatureBlob() supports two additional parameters: "BiometricHash" and "Signature".

de.softpro.doc.SignDocDocument.getShootInFoot() has been added. There are new functions, de.softpro.doc.SignDocDocument.setFlags() and de.softpro.doc.SignDocDocument.getFlags() for controlling flags that modify the behavior of various functions.

de.softpro.doc.SignDocDocument.getField() etc. no longer return an empty button value if there are multiple values for a check box field. You can get back the old behavior by using de.softpro.doc.SignDocDocument.setFlags().

There is no longer an ordering relation for de.softpro.doc.SignDocRenderParameters objects; however, they can be compared for equality.

de.softpro.doc.SignDocDocument.importPages() now can import pages from PDF documents with logical structure; the logical structure is currently not imported.

de.softpro.doc.SignDocDocument.addTextRect() now supports complex scripts, but automatic line breaking is not supported for complex scripts.

The text of multiline text fields is now broken into lines to fit the field width. This is not yet implemented for complex scripts. Pass the de.softpro.doc.SignDocDocument.SetFieldFlags.DontBreakLines flag to disable line breaking for multiline text fields.

The compression level to be used for compression streams with the FlateDecode filter in PDF documents can be set with de.softpro.doc.SignDocDocument.setCompressionLevel(). You can speed up embedding fonts, adding attachments, adding images and other operations by chosing a low compression level.

In particular on Android, you can speed up reading a PDF document by mapping the file into memory, see de.softpro.doc.SignDocDocumentLoader.setFlags().