Adding Custom Annotations/Fields in a Document

Hi, I have below requirements. I am using group docs Java and I have a valid license. Need your support

  1. I have to add custom fields like Sign button or Image in a document. On Click of that button, I have to trigger a function to display list of Signatures.
  2. I have to add custom fields in a document like Name and Date so that when the person views the document to sign, its value should be replace with the actual values.

Can you please let me know if it is possible to do these things using group docs annotation and signature feature ?

@nites67,

Thanks for taking interest in GroupDocs APIs and posting your concerns.
Please note that both (GroupDocs.Annotation and GroupDocs.Signature) APIs are UI-Independent.

GroupDocs.Signature for Java allows you to significantly sign electronic documents. You can add various kind of signatures in a document such as text, image or digital. See details here. API doesn’t provide any such feature to display list of applied signatures in a document. However, you can achieve this at your code level. Whenever user signs a document, save that information (username, document name, signature type etc) at your end and next time when same document is being opened in the application, signature details/list could be retrieved from data source against specified or opened document. There could be any other business logic in order to achieve this scenario.

In GroupDocs.Annotation for Java when a user add some (text, image etc) annotation, he/she can set creator name in the code and that will appear with the annotation. However, in GroupDocs.Signature for Java you cannot set name and date as a default setter property of the API. There are no such properties.

Using GroupDocs.Annotation API you can just annotate documents. Please see feature details here.
For further inquiries regarding GroupDocs.Signature, we’d encourage you to post here.

Hi , Thank you for the update. Can you please advise how can i set the creator name and date that will appear with annotation ? In Addition, I need to add few labels like signature,place etc. at least for the recipient to see and add the signature like how it will be shown actually in a physical document. I used text field feature of annotation but when the recipient views the annotated document , he cannot see that text field. It will be minimized and only a text field box will be displayed. Can you please let me know How do i remove that border and display the actual label which i had given before annotating ?

@nites67,

You can set creator name as follows:

textAnnotation.setCreatorName("Anonym A.");

For further details, please visit this article.
However, there is no such property for adding/setting date. Before further investigation, can you please confirm if you are using our Spring showcase project?

Hi, Thanks for the update. I will check and Yes, I am using your Spring showcase project.

@nites67,

Thanks for the details.

API doesn’t provide any such feature (providing a signature field). However, as a workaround you can use text field annotation.

We have logged this issue at GitHub. Please follow this link for future updates and correspondence.
However, we’ll also notify you as we have any further update.

@nites67,

Before further investigation, can you please confirm if API license is properly loaded/applied? Please share annotated file/output with us.

Hi, Thanks for the update. I stopped using annotations at the moment since there is an option to add texts from text signature . I printed the stack trace while loading the license for signature. Please find the error logs attached. I could not figure it out. Can you please suggest what kind of error it is ?

LicenseError.pdf (65.1 KB)

@nites67,

Your issue is already addressed in this thread.

Hi, Can you please let me know if you have any update on this ?

I cannot see the text field properly after annotation. I am using your Spring application for annotation

@nites67,

Using Spring application, we can successfully add and view text field annotation. Please see following screenshots:

Can you please share your output/annotated file with us?

Hi, THanks for the update. It looks to be fine now. I had another concern regarding changing the font size and color of the text annotations which I had raised and you had addressed it saying the enhancement will be done. Thanks for your support once again.

I have another issue. I have a Spring boot project with both annotation and signature api’s but I am unable to deploy it on tomcat server. Getting this weird error and I am not able to figure it out.

Have you encountered this error before ? If you can help me with this, I would really appreciate it

Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/app] due to a StackOverflowError . Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies . The class hierarchy being processed was com.aspose.email.internal.e.d->com.aspose.email.internal.e.d

1 Like

@nites67,

This query is addressed here.