Free Support Forum - groupdocs.com

How to add signature field in the document


#1
Dear Support,

We have seen the samples that you have provided and have been able to create envelope, add pdf document to envelope and then add recipient information. But system is not sending the PDF because there is no field added.

How do we add signature field "tags" to our PDF document such as: Signature Block, and Date Signed that can be recognized by the API.

We want to prepare a document (preferably pdf) in our CRM and make envelope using API and then send it for signing using API.

Problem that we are facing right now is how to add field in the pdf document so that user can sign it. Can you please suggest how to add signature field "tags" in the pdf that we are uploading using the group docs API and then sending it end user for signing.

Thanks

#2

Hi,


Thank you for the question. To add signature field to the document via API you can use such code example:
$signFieldEnvelopSettings1 = new SignatureEnvelopeFieldSettingsInfo();
$signFieldEnvelopSettings1->locationX = “0.15”;
$signFieldEnvelopSettings1->locationY = “0.73”;
$signFieldEnvelopSettings1->locationWidth = “150”;
$signFieldEnvelopSettings1->locationHeight = “50”;
$signFieldEnvelopSettings1->name = “test” . rand(0, 500);
$signFieldEnvelopSettings1->forceNewField = true;
$signFieldEnvelopSettings1->page = “1”;
$signFieldEnvelopSettings1->lockDuringSign = false;
$addEnvelopField = $signature->AddSignatureEnvelopeField($clientID, $envelop->result->envelope->id, $getDocuments->result->documents[0]->documentId, $recipientId, “0545e589fb3e27c9bb7a1f59d0e3fcb9”, $signFieldEnvelopSettings1);

Best regards.

#3

Thanks, but further question:


Is there a text “TAG” that can be included in the document so the API will recognize it as a signature block? This is how other Signature APIs from other vendors works.
It is good to insert the signature field via a location, but also good to be able to insert based on a text “TAG” that the API recognizes that can be manually added to document for signing.
Ex: “Signature” or "Date_Signed"

Is this also supported?


#4

Hi,


Since you want to add a field in the pdf directly you should Acrobat documentation for how. From their documentation: "Acrobat (Pro) is absolutely the correct tool to accomplish this. However, keep in mind that the current version is Acrobat XI, which is overall much better than X (IMHO).

You will work in the Forms Edit mode (Tools pane --> Forms --> Edit). There you select the Digital Signature Field tool, and place the field wherever it is needed. With the Text field tool, you place the other fields, and in their respective Properties dialog, you can set them read-only, and/or add default values, and/or add logic."

Best regards.

#5

This is not what was requested. Manually inserting fields each time a document is created is not desired. What is the text “tag” that can be inserted into the document BEFORE it is sent to the API?


A text “tag” is how other e-signature API allows functionality. Opening each document manually and editing in Adobe Acrobat Pro is very time consuming.

***Using GroupDocs Signature API, please advise what text “tag” should be used for the Signature, Date Signed fields.

Example of Signature text “tag” used in Adobe Echosign:
{{Sig_es_:signer1:signature}}
– A signature field assigned to the first signer.


Example of requested functionality as it exists in Adobe Echosign:
===============================================
EchoSign Text Tags are specially formatted text that can be placed anywhere within the content of your document specifying the location, size, type of fields such as signature and initial fields, check boxes, radio buttons and form fields, and advanced optional field processing rules. Text Tags can also be used as names of PDF Form fields. Text Tags are converted into EchoSign form fields when the document is sent for signature or uploaded to the EchoSign Document Library. EchoSign Text Tags can be placed in any document type such as PDF, Microsoft Word, PowerPoint, Excel and text files (.txt, .rtf). For example:

{{Sig_es_:signer1:signature}}
– A signature field assigned to the first signer.

{{Cmpy_es_:signer1:company}}
– A field for the second signer to enter her company name.


#6

Hi,


Thank you for the clarification. I will check it with the Product team and then return to you with more details.

Sorry for the inconvenience.

#7
Dear Support,

I am trying to create a envelope and then add a pdf document in that envelope and adding the receipient information to it and then sending but system is failing to send the document saying that no field is added to the document. How can i add signature field in the document precisely at the location that i am looking for. Our PDF are getting generated dynamically and can't calculate the co-ordinates of signature. Please advise on 2 things. How the signature field can be added and then advise regarding location of the signature.


http://groupdocs-dotnet-samples.apphb.com/samples/sample-21-how-to-create-and-upload-envelop-to-groupdocs-account-using-dotnet-sdk

Please provide .Net Reference


Thanks

#8

I have tried to add the signature to the envelope



Groupdocs.Api.Contract.Signature.SignatureEnvelopeFieldSettingsInfo fInfo = new Groupdocs.Api.Contract.Signature.SignatureEnvelopeFieldSettingsInfo();
fInfo.LocationX = new decimal(0.15);
fInfo.LocationY = new decimal(0.73);
fInfo.LocationWidth = 150;
fInfo.LocationHeight = 50;
fInfo.Name = “Signature”;
fInfo.ForceNewField = true;
fInfo.Page = 1;
fInfo.LockDuringSign = false;
Groupdocs.Api.Contract.Signature.SignatureEnvelopeFieldResponse field_response = service.AddEnvelopeField(envelop.Result.Envelope.Id, guid, addRecipient.Result.Recipient.Id, “0545e589fb3e27c9bb7a1f59d0e3fcb9”, fInfo);


but when the sample code goes to collect the count of envelope field

Groupdocs.Api.Contract.Signature.SignatureEnvelopeFieldInfo[] fieldInfo = getFields.Result.Fields;
if (fieldInfo.Length == 0)
{
Response.Write(“error, You use a wrong file, it’s don’t content any fields for sign”);
}


fails.

Below message gets printed and system does not dispatch the envelope for signing.

"error, You use a wrong file, it’s don’t content any fields for sign"




Thanks

#9

Hi,


Thank you for the question. To get envelope fields please follow next sequence:
Groupdocs.Api.Contract.Signature.SignatureEnvelopeDocumentsResponse getDocuments = service.GetEnvelopeDocuments(envelop.Result.Envelope.Id);
Groupdocs.Api.Contract.Signature.SignatureEnvelopeFieldsResponse getFields = service.GetEnvelopeFields(envelop.Result.Envelope.Id, getDocuments.Result.Documents[0].DocumentId, addRecipient.Result.Recipient.Id, null);
Groupdocs.Api.Contract.Signature.SignatureEnvelopeFieldInfo[] fieldInfo = getFields.Result.Fields;

But in such case the document should contain fields, if your document dosn’t has fields you will get this error. Such approach can be used only if the document has fields and you want to add more fields in it via API. So since your document doens’t has fields and you add it - you don’t need to use GetEnvelopeFields method.

As for the TAG and question about adding the fields - Unfortunately the current version of the GroupDocs.Signature for Cloud doesn’t support a TAG functional (we will add it to our road map for future implementation). Since that the only way to add the signature field is to use the API.
1. Create envelop
2. Add your PDF to it
3. Add envelop recipient.
4. Add fields.
5. Send envelop.

Best regards.

#10

Dear Support,


One conceptual question:

What is the difference between adding the signature field in the envelope and adding the signature field in the document???

We want the signature field to be added to the PDF document that we are sending to the API. What is the best way to do this?

Thanks

#11

Hi,


Thank you for the question. There is no different how you will add the signature field via the envelop or directly in the document, the only thing that you should note - if you use a document with added signature field you should set this option .

The only way to add signature field to the document with out using our App is to add it as described here.

Best regards.