docusign / docusign-esign-php-client

The Official Docusign PHP Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
https://www.docusign.com/devcenter
MIT License
198 stars 123 forks source link

Signature Tabs Shifted Up After Upgrading from ^4.0 to ^6.12.0 #233

Closed sanycmi closed 2 weeks ago

sanycmi commented 3 weeks ago

Description:

After upgrading from docusign/esign-client version ^4.0 to ^6.12.0, we noticed that all the signature tabs (SignHereTab) in our documents have shifted up by a few spots. This issue was not present in version ^4.0.

Environment:

Code Sample:

Here is the relevant part of our code that was working fine with version ^4.0 but started showing issues after the upgrade:

public function addTabs(int $document_id, int $prior_pages): void {
    DocuSignTabs::add(new \DocuSign\eSign\Model\SignHere([
        'document_id' => $document_id,
        'recipient_id' => 3,
        'tab_label' => 'SignHereTab',
        'page_number' => $prior_pages + 1,
        'x_position' => 110,
        'y_position' => 185,
    ]));
}

Issue Description:

Impact:

This issue affects multiple files where we would now need to manually update the y_position to correct the tab alignment. Given the number of files impacted, this is not a practical solution.

Steps to Reproduce:

Expected Behavior:

Actual Behavior:

Additional Context:

Request:

Could you please provide any guidance on how to resolve this issue or suggest a workaround that would avoid having to manually adjust the x_position and y_position in multiple files? Any insights or documentation references would be greatly appreciated.

esilva600 commented 3 weeks ago

Hello Sany,

During the upgrade from Rest API from 2.0 to 2.1 it resulted in changes to the tag processing. To fix this, you need to rearrange the offsets to display as expected.

You can find more details in our documentation related to this update and the changes: https://developers.docusign.com/docs/esign-rest-api/esign101/upgrading-v21/

Thanks,

sanycmi commented 2 weeks ago

Thanks to the documentation provided by @esilva600, we were able to implement an offset of 21 for SignHere and 16 for InitialHere. We achieved this by utilizing a wrapper, which allowed us to apply these adjustments without needing to modify every instance where they were used.