Skip to main content

Hi y'all.

I am creating an automation (using Node.js) for a client. The client is in the construction business and need to sign some PDF forms along with their customers.

The first document is the county's permit. Where the customer (property owner), the constructor company (my client) and a notary needs to sign.


My automation is already fulfilling and pdf template with data that comes from X sources. After this step, I will required the customer's (property owner) signature. My PDF has a signature field: `Signature4`, as you can see in the image.

 

I am usign docusign-esign SDK for Node.js, and I am already able to authenticate and create the envelope.

For now, the recipient number 1 (the property owner) is set to be a temporary email that I have here. In production, this is going to be the real email of the property owner.

 

However, when I open to sign, I don't have any fields to sign.

 

I tried to create a template, using the same file (fulfilled pdf file) and DocuSign was able to convert the pdf form fields to the signable HTML document.

Below, an example of payload I am sending:

 

```js

{
    emailSubject: 'Sign county construction permit',
    documents: c{
        documentBase64: < base64 > ,
        name: 'Permit for construction of a residential building',
        documentId: '123123124',
        htmlDefinition: ÂObject]
    }],
    recipients: {
        signers: n{
            email: 'mytempemail@tempemail.com',
            name: 'Jonathan Galdino',
            recipientId: '123',
            routingOrder: '1',
            tabs: {
                signHereTabs: /

                    {
                        recipientId: '123',
                        documentId: '123123124',
                        anchorString: '/Signature 4/',
                        tabLabel: 'Signature 4',
                        pageNumber: 2,
                        xPosition: 151,
                        yPosition: 330,
                        anchorUnits: 'pixels',
                        anchorHorizontalAlignment: 'left'
                    }

                ]
            }
        }]

    },
    status: 'sent'
}

```

 

I also tried using `transformPdfFields` but, the output is a terrible pdf and it also fails to "attach" the sign field to a signer.


You can transform the PDF form fields into Docusign tabs by specifying the transformPdfFields property as true and the assignTabsToRecipientId property as the recipient ID. Also, you should upload the PDF file as a document to utilize PDF form field transformation correctly. More information about the PDF form field transformation is here: https://developers.docusign.com/docs/esign-rest-api/esign101/concepts/tabs/pdf-transform/


Thank you @Byungjae.Chung, for the answer.

I tried transform the PDF form fields into docusign tabs. I did not liked the results, because the file has a lot of fields and I didn't want to assign them to one of the signers.

 

I faced some difficulty into configuring the tab using `xPosition` and `yPosition`. However, after some hours trying it, I manage to achieve with some basic configuration (funny, right?).

 

signHereTabs: :
{
documentId: "2832932",
pageNumber: "2",
height: "103",
xPosition: "190",
yPosition: "325",
optional: false,
},
{
documentId: "2832932",
pageNumber: "3",
height: "103",
xPosition: "161",
yPosition: "361",
optional: false,
},
],

 


Reply