SignDoc SDK (C)  5.0.1.32
All Classes Files Functions Variables Typedefs Macros Pages
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 SIGNDOC_Document_updateDSS() or SIGNDOC_Document_updateDSS2() and then adding a document time stamp by calling SIGNDOC_Document_createSignatureParametersForTimeStamp(), configuring an RFC 3161 time stamp server, and calling SIGNDOC_Document_addSignature().

A new class, SIGNDOC_Signature, has been added to enable long term validation of signatures and implementation of a GUI element equivalent to Adobe Reader's signature panel. See SIGNDOC_Document_getSignature(). There is a new version of SIGNDOC_Document_verifySignature() which takes a SIGNDOC_Signature object as input: SIGNDOC_Document_verifySignature2(). There are subtle differences between those functions.

Intermediate certificates and trusted root certificates can be added to a SIGNDOC_VerificationParameters object by using SIGNDOC_VerificationParameters_setBlob().

SIGNDOC_Document_addSignature() now can create certification signatures for PDF documents, see SIGNDOC_Field_getDocMDP(), SIGNDOC_Field_getSignatureType(), SIGNDOC_Field_getSeedValueMDP(), SIGNDOC_Field_setSeedValueMDP(), and integer parameter "DocMDP" of SIGNDOC_SignatureParameters.

SIGNDOC_Document_addSignature() now performs a basic verification of the signature after signing a PDF document unless that verification is disabled by SIGNDOC_Document_setShootInFoot().

Use SIGNDOC_VerificationResult_getModificationState() to verify if modifications of a PDF document are allowed by a signature. SIGNDOC_RenderParameters_setModificationState() controls whether that function is called for computing decorations.

The most recently used verification time can be retrieved by passing "VerificationTime" to SIGNDOC_VerificationResult_getSignatureString(). "Filter" now gets the Filter (rather than the SubFilter entry), "SubFilter" gets the SubFilter entry.

SIGNDOC_Document_removePermissions() no longer removes DocMDP permissions, it removes UR and UR3 permissions only. To remove all certification signatures, use new function SIGNDOC_Document_removeDocMDP().

SIGNDOC_Document_setField() and SIGNDOC_Document_applyFdf() now reject changes that would break existing signatures. SIGNDOC_Document_clearSignature() now fails if it would break other existing signatures. SIGNDOC_Document_clearAllSignatures() now fails if it would break Reader-enablement of a PDF document. To remove all approval signatures, use new function SIGNDOC_Document_clearApprovalSignatures().

SIGNDOC_Document_addField(), SIGNDOC_Document_addSignature(), SIGNDOC_Document_applyFdf(), and SIGNDOC{Document,setField()} now fail if XFA cannot be removed without breaking existing signatures.

There are new integer parameters for SIGNDOC_SignatureParameters: "BiometricHashLocation" and "RemoveXFA".

As software-based private keys and hardware-based private keys cannot be reliably distinguished, you should always set both SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_SOFTWARE and SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESELECTIONFLAGS_HARDWARE in integer parameter "SelectCertificate" rather than only one of those flags.

The logical structure of a PDF document can be removed with SIGNDOC_Document_removeLogicalStructure(). XFA content of a PDF document can be removed with SIGNDOC_Document_removeXFA().

You can speed up rendering with decorations (and support LTV) by providing your own (cached) verification results via SIGNDOC_RenderParameters_setDecorationState().

Obsolete functions SIGNDOC_Document_getDataBlock() and SIGNDOC_Document_setDataBlock() have been removed.

There is a new value, SIGNDOC_SIGNATUREPARAMETERS_DETACHEDHASHALGORITHM_SHA224 for integer parameter "DetachedHashAlgorithm" of SIGNDOC_SignatureParameters. 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 SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESIGNINGALGORITHM_SHA1_RSA to SIGNDOC_SIGNATUREPARAMETERS_CERTIFICATESIGNINGALGORITHM_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", SIGNDOC_SIGNATUREPARAMETERS_RENDERSIGNATUREFLAGS_LIMIT_SIZE which prevents magnification of signatures.

You can now retrieve page labels by calling SIGNDOC_Document_getPageLabel().

You can now flatten non-widget annotations by calling SIGNDOC_Document_flattenAnnotations().

The default value of integer parameter "PDFAButtons" has been changed from SIGNDOC_SIGNATUREPARAMETERS_PDFABUTTONS_AUTO to SIGNDOC_SIGNATUREPARAMETERS_PDFABUTTONS_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.