![]() |
SignDoc SDK (C)
5.0.0
|
This section lists the API changes between version 3.x and version 4.0 of SignDoc SDK and how to change your application to work with the new API.
SPSignDoc_4.0.dll has been built with Microsoft Visual Studio 2008 only. Thanks to the new C API and C++ wrapper in SignDocSDK-cpp.h, that DLL should work with all C++ compilers.
PDFNet is no longer used, you don't have to deploy the PDFNet DLL.
Some operations now fail if they would invalidate existing signatures or make a document which claims to be a PDF/A document no longer conform to PDF/A. If you want to perform those operations anyway, you can unsign signature fields with SIGNDOC_Document_clearAllSignatures(), remove signatures granting permissions with SIGNDOC_Document_removePermissions(), and turn a PDF/A document into a plain PDF document with SIGNDOC_Document_removePDFA(). See also SIGNDOC_Document_setShootInFoot()
Attempts to sign with a certificate that is not yet valid or no longer valid or which is not qualified for digital signatures now fail. See also SIGNDOC_Document_setShootInFoot().
Using a TrueType font without embedding it is no longer allowed. See also SIGNDOC_Document_setShootInFoot(). The default value of the "embed" attribute of the FontFiles element has been changed from "no" to "subset".
Classes SignDocGrayColor and SignDocRGBColor have been removed, all types of color are now represented by class SIGNDOC_Color. Use the static factory methods of class SIGNDOC_Color to create SignDocColor objects.
SIGNDOC_DocumentLoader_registerDocumentHandlerLibrary() has been removed.
SIGNDOC_Property_setName() and SIGNDOC_Property_setType() have been removed.
Class TimeStampClient has been replaced by class SIGNDOC_TimeStamper and is now implemented.
Function SIGNDOC_Field_isSigned() has been added. If you just need to know whether a field is signed or not, this function will be much more efficient than SIGNDOC_Document_verifySignature().
SIGNDOC_Document_setField() no longer moves or resizes fields. To force SIGNDOC_Document_setField() to move or resize a field, pass the SIGNDOC_DOCUMENT_SETFIELDFLAGS_MOVE flag.
SIGNDOC_Document_flattenFields() now ignores signatures fields and hidden/invisible widgets; this behavior can be changed by passing appropriate flags.
SIGNDOC_Document_saveToFile() now can save to a new file (that is, a pathname can be passed in aPath) even if SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL is set in aFlags. SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL can also be used if the document was loaded from memory. SIGNDOC_Document_saveToStream() now supports SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL.
SIGNDOC_Document_copyToStream() now has a new argument, aFlags. Pass SIGNDOC_DOCUMENT_COPYTOSTREAMFLAGS_UNSAVED to include unsaved changes without actually saving the document.
Function SIGNDOC_SignatureParameters_clearTextItems() has been added.
Using string parameter "OutputPath" for signing a PDF document that already contains signatures no longer break existing signatures.
A PDF document loaded from memory (or saved to a stream) can now be signed without saving to a file (ie, without setting string parameter "OutputPath"). Use SIGNDOC_Document_copyToStream() with 0 for aFlags to save the document after signing in that case.
By using the special value "<memory>" for string parameter "OutputPath", a PDF document loaded from a file can be signed in memory, ie, without writing to that file.
SIGNDOC_SignatureParameters has a new string parameter, "FontName", and a new color parameter, "TextColor". They can be used to override the signature field's text field attributes or to provide a font and a color in the absence of text field attributes.
Attempts to sign a PDF document which already has signatures will fail if integer parameter "Optimize" is set to SIGNDOC_SIGNATUREPARAMETERS_OPTIMIZE_OPTIMIZE.
The C API has undergone a lot of changes:
The following sections describe the changes in detail.
Renamed and removed constants, classes, and functions:
Old | New | Notes |
---|---|---|
SIGNDOC_EXCEPTION_BAD_ALLOC | SIGNDOC_EXCEPTION_TYPE_BAD_ALLOC | |
SIGNDOC_EXCEPTION_GENERIC | SIGNDOC_EXCEPTION_TYPE_GENERIC | |
SIGNDOC_EXCEPTION_PDF | SIGNDOC_EXCEPTION_TYPE_PDF | |
SIGNDOC_EXCEPTION_SPOOC | SIGNDOC_EXCEPTION_TYPE_SPOOC_GENERIC | |
SIGNDOC_EXCEPTION_STL | SIGNDOC_EXCEPTION_TYPE_STL | |
SIGNDOC_NO | SIGNDOC_FALSE | SIGNDOC_Boolean |
SIGNDOC_RENDERPARAMETERS_VERIFICATIONMODEL_WINDOWS | SIGNDOC_RENDERPARAMETERS_VERIFICATIONMODEL_DEFAULT | |
SIGNDOC_VERIFICATIONRESULT_VERIFICATIONMODEL_WINDOWS | SIGNDOC_VERIFICATIONRESULT_VERIFICATIONMODEL_DEFAULT | |
SIGNDOC_YES | SIGNDOC_TRUE | SIGNDOC_Boolean |
SIGNDOC_delete() | SIGNDOC_free() | |
SIGNDOC_getInstallationCode() | SIGNDOC_DocumentLoader_getInstallationCode() | |
SIGNDOC_initLicenseManager() | SIGNDOC_DocumentLoader_initLicenseManager() | |
SIGNDOC_setLicenseKey() | SIGNDOC_DocumentLoader_setLicenseKey() | |
SIGNDOC_Annotation_addPoint_double() | SIGNDOC_Annotation_addPointXY() | |
SIGNDOC_Annotation_setName() | SIGNDOC_Annotation_setNameW() | (3) |
SIGNDOC_Annotation_setName_cset() | SIGNDOC_Annotation_setName() | (4) |
SIGNDOC_Attachment_dup() | SIGNDOC_Attachment_clone() | |
SIGNDOC_Attachment_set() | SIGNDOC_Attachment_assign() | |
SIGNDOC_Attachment_swap() | removed (2) | |
SIGNDOC_BufferInputStream() | removed | |
SIGNDOC_BufferOutputStream() | removed | |
SIGNDOC_Document_applyFdf() | SIGNDOC_Document_applyFdfW() | (3) |
SIGNDOC_Document_applyFdf_cset() | SIGNDOC_Document_applyFdf() | (3) |
SIGNDOC_Document_createFreeTextAnnotation_double() | SIGNDOC_Document_createFreeTextAnnotationXY() | |
SIGNDOC_Document_createLineAnnotation_double() | SIGNDOC_Document_createLineAnnotationXY() | |
SIGNDOC_Document_renderPageAsSpoocImage() | removed | |
SIGNDOC_Document_renderPageAsSpoocImages() | removed | |
SIGNDOC_Document_saveToFile() | SIGNDOC_Document_saveToFileW() | (3) |
SIGNDOC_Document_saveToFile_cset() | SIGNDOC_Document_saveToFile() | (4) |
SIGNDOC_DocumentLoader_loadFontConfigFile() | SIGNDOC_DocumentLoader_loadFontConfigFileW() | (3) |
SIGNDOC_DocumentLoader_loadFontConfigFile_cset() | SIGNDOC_DocumentLoader_loadFontConfigFile() | (4) |
SIGNDOC_DocumentLoader_loadFontConfigStream() | SIGNDOC_DocumentLoader_loadFontConfigStreamW() | (3) |
SIGNDOC_DocumentLoader_loadFontConfigStream_cset() | SIGNDOC_DocumentLoader_loadFontConfigStream() | (4) |
SIGNDOC_DocumentLoader_loadFromFile() | SIGNDOC_DocumentLoader_loadFromFileW() | |
SIGNDOC_DocumentLoader_loadFromFile_cset() | SIGNDOC_DocumentLoader_loadFromFile() | |
SIGNDOC_DocumentLoader_loadPdfFontConfigFile() | SIGNDOC_DocumentLoader_loadPdfFontConfigFileW() | (3) |
SIGNDOC_DocumentLoader_loadPdfFontConfigFile_cset() | SIGNDOC_DocumentLoader_loadPdfFontConfigFile() | (4) |
SIGNDOC_DocumentLoader_loadPdfFontConfigStream() | SIGNDOC_DocumentLoader_loadPdfFontConfigStreamW() | (3) |
SIGNDOC_DocumentLoader_loadPdfFontConfigStream_cset() | SIGNDOC_DocumentLoader_loadPdfFontConfigStream() | (4) |
SIGNDOC_DocumentLoader_registerDocumentHandlerLibrary() | removed | |
SIGNDOC_DocumentLoader_registerDocumentHandlerLibrary_cset() | removed | |
SIGNDOC_Exception_dispose() | removed | |
SIGNDOC_Exception_get_text() | SIGNDOC_Exception_getText() | (1) |
SIGNDOC_Exception_get_type() | SIGNDOC_Exception_getType() | |
SIGNDOC_Exception_set_handler() | SIGNDOC_Exception_setHandler() | |
SIGNDOC_Field_addChoice_with_export() | SIGNDOC_Field_addChoiceWithExport() | |
SIGNDOC_Field_dup() | SIGNDOC_Field_clone() | |
SIGNDOC_Field_set() | SIGNDOC_Field_assign() | |
SIGNDOC_Field_setCertSeedValueIssuerCertificate() | SIGNDOC_Field_setCertSeedValueIssuerCertificateByIndex() | |
SIGNDOC_Field_setCertSeedValueIssuerCertificate_at() | SIGNDOC_Field_setCertSeedValueIssuerCertificate() | |
SIGNDOC_Field_setCertSeedValuePolicy_by_index() | SIGNDOC_Field_setCertSeedValuePolicyByIndex() | |
SIGNDOC_Field_setCertSeedValueSubjectCertificate() | SIGNDOC_Field_setCertSeedValueSubjectCertificateByIndex() | |
SIGNDOC_Field_setCertSeedValueSubjectCertificate_at() | SIGNDOC_Field_setCertSeedValueSubjectCertificate() | |
SIGNDOC_Field_setCertSeedValueSubjectDN_by_index() | SIGNDOC_Field_setCertSeedValueSubjectDNByIndex() | |
SIGNDOC_Field_setChoice_with_export() | SIGNDOC_Field_setChoiceWithExport() | |
SIGNDOC_Field_setLockField_by_index() | SIGNDOC_Field_setLockFieldByIndex() | |
SIGNDOC_Field_setValue_by_index() | SIGNDOC_Field_setValueByIndex() | |
SIGNDOC_Field_swap() | removed (2) | |
SIGNDOC_FileInputStream | use SIGNDOC_InputStream | |
SIGNDOC_FileOutputStream | use SIGNDOC_OutputStream | |
SIGNDOC_FileOutputStream_new() | SIGNDOC_FileOutputStream_newWithFile() | |
SIGNDOC_FileOutputStream_new_from_fn() | SIGNDOC_FileOutputStream_newWithPath() | |
SIGNDOC_FileOutputStream_new_from_fn_us() | removed | |
SIGNDOC_FileOutputStream_new_from_fn_w() | SIGNDOC_FileOutputStream_newWithPathW() | |
SIGNDOC_FileOutputStream_new2() | SIGNDOC_FileOutputStream_newWithFileAndPath() | |
SIGNDOC_FilterInputStream | removed | |
SIGNDOC_InputStream_to_SIGNDOC_MemoryInputStream() | removed | |
SIGNDOC_MemoryInputStream | use SIGNDOC_InputStream | |
SIGNDOC_MemoryOutputStream | use SIGNDOC_OutputStream | |
SIGNDOC_OutputStream_to_SIGNDOC_FileOutputStream() | removed | |
SIGNDOC_OutputStream_to_SIGNDOC_MemoryOutputStream() | removed | |
SIGNDOC_Point_dup() | SIGNDOC_Point_clone() | |
SIGNDOC_Point_new_from_coords() | SIGNDOC_Point_newXY() | |
SIGNDOC_Point_set() | SIGNDOC_Point_assign() | |
SIGNDOC_Point_set_double() | SIGNDOC_Point_setXY() | |
SIGNDOC_Property_dup() | SIGNDOC_Property_clone() | |
SIGNDOC_Property_set() | removed | |
SIGNDOC_Property_setName() | removed | |
SIGNDOC_Property_setType() | removed | |
SIGNDOC_Property_swap() | removed (2) | |
SIGNDOC_Rect_dup() | SIGNDOC_Rect_clone() | |
SIGNDOC_Rect_scale_xy() | SIGNDOC_Rect_scaleXY() | |
SIGNDOC_Rect_new_from_coords() | SIGNDOC_Rect_newXY() | |
SIGNDOC_Rect_set() | SIGNDOC_Rect_assign() | |
SIGNDOC_Rect_set_double() | SIGNDOC_Rect_setXY() | |
SIGNDOC_RenderOutput_setHeight() | removed | |
SIGNDOC_RenderOutput_setWidth | removed | |
SIGNDOC_RenderParameters_dup() | SIGNDOC_RenderParameters_clone() | |
SIGNDOC_RenderParameters_set() | SIGNDOC_RenderParameters_assign() | |
SIGNDOC_SignatureParameters_setString() | SIGNDOC_SignatureParameters_setStringW() | (3) |
SIGNDOC_SignatureParameters_setString_cset() | SIGNDOC_SignatureParameters_setString() | (4) |
SIGNDOC_TextFieldAttributes_dup() | SIGNDOC_TextFieldAttributes_clone() | |
SIGNDOC_TextFieldAttributes_set() | SIGNDOC_TextFieldAttributes_assign() | |
SIGNDOC_TextFieldAttributes_swap() | removed (2) | |
SIGNDOC_Watermark_dup() | SIGNDOC_Watermark_clone() | |
SIGNDOC_Watermark_swap() | removed (2) | |
SIGNDOC_VerificationResult_getBiometricData() | SIGNDOC_VerificationResult_getBiometricDataW() | (3) |
SIGNDOC_VerificationResult_getBiometricData_cset() | SIGNDOC_VerificationResult_getBiometricData() | (4) |
SIGNDOC_Watermark_set() | SIGNDOC_Watermark_assign() |
Notes:
Other changes: