Free Support Forum - groupdocs.com

Multiple signature and return document after signing


#1

Hello,

I use the groudocs signature in php : https://github.com/groupdocs/groupdocs-php

we met some problems :

1. We have a document (ppt,doc,xls) to make signature , the output is automaticaly in pdf (default option), but we can to recover the orginal document extension with signature (like ppt,doc,xls according the input). is it possible? and how to make that?

2. On the multiple signature, in the sample code 44 php, there are two person who can make a signature but we need three person to do the signature.

we tried to do this code :

$addThreeRecipient = $signature->AddSignatureEnvelopeRecipient($clientId, $envelop->result->envelope->id, $secondEmail, $ThirdName, $lastName . “2”, $roleId, null);


it does not work

how to make that?

Best regards.


#2

Hello,


Thank you for your request.
1. Could you please provide more info about what you need because from your request it’s note clear.

2. This method can add only one recipient per request, the code which you see in the example 44 simply run this request twice with almost same data except that the user’s last name we concatenate with “2” to get another user name for example “user2”. Since that to add several recipients you simply need to run this method in the loop which will iterate over array with users data one by one and current user data to the method.

Best regards.

#3

Hello,

About groupdocs tools, Is-it possible to have the same file type like in input ?
Eg: If, we have a xls file in input => we will have a xls file with signature in output.


#4

Hello,


Thank you for your request. Unfortunately no, it’s always a pdf output, the input xls is converted to pdf and then the pdf is filled and signed and saved as output again in pdf. This made for a safety feature to prevent changes of the document after it was signed.

Best regards.

#5

Hello,

Thanks you for your response, concerning the multiple signature,
we tried this code :


$addRecipient =
$signature->AddSignatureEnvelopeRecipient($clientId,
$envelop->result->envelope->id, $mail1, $name1,
$lastName1, $roleId, null);

// Statut = ok
if($addRecipient->status == “OK”)
{
$addSecondRecipient =
$signature->AddSignatureEnvelopeRecipient($clientId, $envelop->result->envelope->id, $mail2, $name2,
$lastName2, $roleId, null);

// Statut = ok
if($addSecondRecipient->status == “OK”)
{
$addThreeRecipient =
$signature->AddSignatureEnvelopeRecipient($clientId,
$envelop->result->envelope->id, $mail3, $name3,
$lastName3, $roleId, null);

// Statut = Failed
if($addThreeRecipient ->status == “OK”)
{

}

}
}

********************
Here, the return obtained after debugging :

SignatureEnvelopeRecipientResponse Object
(
[result] => SignatureEnvelopeRecipientResult Object
(
[envelopeId] => 5c40579cfc86795c922e5b80c83a037
[recipient] => SignatureEnvelopeRecipientInfo Object
(
[id] => 80c1c114eac4a2ac44ce3e7cc6a6b9c
[firstName] => sera
[lastName] => sera
[email] => seraphin_prog_info@yahoo.fr
[userGuid] => 15814ab95f5cdb5
[order] => 0
[roleId] => 2
[status] => 0
[statusMessage] =>
[statusDateTime] =>
[delegatedRecipientId] => 0
[signatureFingerprint] =>
[signatureHost] =>
[signatureLocation] =>
[signatureBrowser] =>
[embedUrl] =>
[comment] =>
)
    )

[status] => Ok
[error_message] => 
[composedOn] => 1449198853542

)

SignatureEnvelopeRecipientResponse Object
(
[result] => SignatureEnvelopeRecipientResult Object
(
[envelopeId] => 5c40579cfc86795c922e5b80c83a037
[recipient] => SignatureEnvelopeRecipientInfo Object
(
[id] => f9aa648f28845309925d63218867287
[firstName] => seraphin1
[lastName] => seraphin2
[email] => seraphin.prog.info@gmail.com
[userGuid] => 4afb43bfdbd58bc
[order] => 0
[roleId] => 2
[status] => 0
[statusMessage] =>
[statusDateTime] =>
[delegatedRecipientId] => 0
[signatureFingerprint] =>
[signatureHost] =>
[signatureLocation] =>
[signatureBrowser] =>
[embedUrl] =>
[comment] =>
)
    )

[status] => Ok
[error_message] => 
[composedOn] => 1449198855866

)

SignatureEnvelopeRecipientResponse Object
(
[result] => SignatureEnvelopeRecipientResult Object
(
[envelopeId] =>
[recipient] =>
)
[status] => <b>Failed</b>
[error_message] => Duplicated recipient
[composedOn] => 1449198858268

)


Do you have a solution please?

Best regards

#6

Hello,


Thank you for the detailed info. The error " Duplicated recipient" means that you already have recipient with same data. To avoid such errors please add such code to check if the recipient is already exists:

$getRecipient = $signature->GetSignatureEnvelopeRecipients($clientID, $envelop->result->envelope->id);
if ($getRecipient->status == “Ok”) {
//check if recipient with same data exists
//If no add recipient
}

Best regards.