SignDoc SDK (C++)  5.0.0
Migrating from SignDoc SDK 4.1 to SignDoc SDK 4.2

You can extend the validity of signatures in PDF documents (long term validity, LTV) by calling de::softpro::doc::SignDocDocument::updateDSS() or de::softpro::doc::SignDocDocument::updateDSS2() and then adding a document time stamp by calling de::softpro::doc::SignDocDocument::createSignatureParametersForTimeStamp(), configuring an RFC 3161 time stamp server, and calling de::softpro::doc::SignDocDocument::addSignature().

A new class, de::softpro::doc::SignDocSignature, has been added to enable long term validation of signatures and implementation of a GUI element equivalent to Adobe Reader's signature panel. See de::softpro::doc::SignDocDocument::getSignature(). There is a new version of de::softpro::doc::SignDocDocument::verifySignature() which takes a de::softpro::doc::SignDocSignature object as input: de::softpro::doc::SignDocDocument::verifySignature2(). There are subtle differences between those functions.

Intermediate certificates and trusted root certificates can be added to a de::softpro::doc::SignDocVerificationParameters object by using de::softpro::doc::SignDocVerificationParameters::setBlob().

de::softpro::doc::SignDocDocument::addSignature() now can create certification signatures for PDF documents, see de::softpro::doc::SignDocField::getDocMDP(), de::softpro::doc::SignDocField::getSignatureType(), de::softpro::doc::SignDocField::getSeedValueMDP(), de::softpro::doc::SignDocField::setSeedValueMDP(), and integer parameter "DocMDP" of de::softpro::doc::SignDocSignatureParameters.

de::softpro::doc::SignDocDocument::addSignature() now performs a basic verification of the signature after signing a PDF document unless that verification is disabled by de::softpro::doc::SignDocDocument::setShootInFoot().

Use de::softpro::doc::SignDocVerificationResult::getModificationState() to verify if modifications of a PDF document are allowed by a signature. de::softpro::doc::SignDocRenderParameters::setModificationState() controls whether that function is called for computing decorations.

The most recently used verification time can be retrieved by passing "VerificationTime" to de::softpro::doc::SignDocVerificationResult::getSignatureString(). "Filter" now gets the Filter (rather than the SubFilter entry), "SubFilter" gets the SubFilter entry.

de::softpro::doc::SignDocDocument::removePermissions() no longer removes DocMDP permissions, it removes UR and UR3 permissions only. To remove all certification signatures, use new function de::softpro::doc::SignDocDocument::removeDocMDP().

de::softpro::doc::SignDocDocument::setField() and de::softpro::doc::SignDocDocument::applyFdf() now reject changes that would break existing signatures. de::softpro::doc::SignDocDocument::clearSignature() now fails if it would break other existing signatures. de::softpro::doc::SignDocDocument::clearAllSignatures() now fails if it would break Reader-enablement of a PDF document. To remove all approval signatures, use new function de::softpro::doc::SignDocDocument::clearApprovalSignatures().

de::softpro::doc::SignDocDocument::addField(), de::softpro::doc::SignDocDocument::addSignature(), de::softpro::doc::SignDocDocument::applyFdf(), and SIGNDOC{Document,setField()} now fail if XFA cannot be removed without breaking existing signatures.

There are new integer parameters for de::softpro::doc::SignDocSignatureParameters: "BiometricHashLocation" and "RemoveXFA".

As software-based private keys and hardware-based private keys cannot be reliably distinguished, you should always set both de::softpro::doc::SignDocSignatureParameters::csf_software and de::softpro::doc::SignDocSignatureParameters::csf_hardware in integer parameter "SelectCertificate" rather than only one of those flags.

The logical structure of a PDF document can be removed with de::softpro::doc::SignDocDocument::removeLogicalStructure(). XFA content of a PDF document can be removed with de::softpro::doc::SignDocDocument::removeXFA().

You can speed up rendering with decorations (and support LTV) by providing your own (cached) verification results via de::softpro::doc::SignDocRenderParameters::setDecorationState().

Obsolete functions de::softpro::doc::SignDocDocument::getDataBlock() and de::softpro::doc::SignDocDocument::setDataBlock() have been removed.

There is a new value, dha_sha224 for integer parameter "DetachedHashAlgorithm" of de::softpro::doc::SignDocSignatureParameters. It can be used for ECDSA signatures only and is not supported on Windows.

The default value of integer parameter "CertificateSigningAlgorithm" has been changed from de::softpro::doc::SignDocSignatureParameters::csa_sha1_rsa to de::softpro::doc::SignDocSignatureParameters::csa_sha256_rsa for RSA keys.

A new string parameter, "GenerateECCKeyPair", can be used for generating a self-signed certificates for ECDSA.

The certificate selection dialog has an additional column showing the key algorithm and key size.

There is a new flag for integer parameter "RenderSignature", de::softpro::doc::SignDocSignatureParameters::rsf_limit_size which prevents magnification of signatures.

You can now retrieve page labels by calling de::softpro::doc::SignDocDocument::getPageLabel().

You can now flatten non-widget annotations by calling de::softpro::doc::SignDocDocument::flattenAnnotations().

The default value of integer parameter "PDFAButtons" has been changed from de::softpro::doc::SignDocSignatureParameters::pb_auto to de::softpro::doc::SignDocSignatureParameters::pb_dont_freeze.

There is a new integer parameter, "ImageDPI", which can be used to control the size of the image passed in blob parameter "Image" in PDF signature fields.