We are back with a major update for our customers who are using the eSign API – GroupDocs.Signature for Java. We have performed major product optimization and revamped the architecture which has made the API more memory efficient and easy to use. We have also added the support of a couple of new file formats. Let’s have an overview of this amazing release and check out what you would get after upgrading to API v2.
What is New in API v2?
We have simplified the way of signing the documents as well as improved the working of the API. Have a look at the key reasons why you should upgrade to the latest release.
- The previous versions of the API had separate classes to deal with each supported document format. For example, we had PdfSignTextOptions class for text signatures in PDF files and WordsSignTextOptions class for Word Processing documents. But now, we have introduced a unified approach where the signature, verification, and search options are related to signature types only and not the document formats. A single class, TextSignOptions will now be used for all the document formats.
- The Signature class is introduced as a single entry point to sign the document with various signature types as well as perform verification and search.
- The overall document related classes that were used to deal with different document formats have been unified to common classes.
- The API’s architecture is redesigned from scratch in order to simplify the usage of options and classes to manipulate all the signature types.
- The procedures of getting the document’s information and generating the previews for the documents are also simplified.
How to Migrate?
The migration process is not as complex as it is supposed to be for the API versions with major updates. The legacy API has been moved into the com.groupdocs.signature.legacy package. Once you upgrade, it is required to make a project-wide replacement of imports from com.groupdocs.signature. to com.groupdocs.signature.legacy to resolve build issues.
The following is a code comparison of the previous versions with the latest one. It will give you an overview of how the coding style, the classes, and the methods have been changed.
Signing Document with Text Signature
Version 19.11 or Later
Setting Up Encryption for Metadata Signature
In addition to the major update, we have also added the feature of setting up the encryption for the metadata signature at the options levels. The MetadataSignOptions class provides setDataEncryption method to specify the encryption type (read more). The following code sample shows how to use this option:
Support of New File Formats
We have added the support of following file formats in the latest release:
If you are interested in migration to the latest release, just download and integrate v19.11 in your applications. We have also updated the source code examples in our GitHub repository so you can easily evaluate the API v2. For more details, consult the documentation or have a conversation with us on our forum.