Skip to main content
Question

Gaps in the Envelope Template when filling via api

  • January 7, 2026
  • 1 reply
  • 77 views

Forum|alt.badge.img

Hello,

I’m using a DocuSign template that is sent via the API and pre-filled with dynamic values (for example: full_name, date_from, date_to, price, etc.).

The values are populated correctly using Text tabs (via tabLabel), however I’m running into a layout issue:

The text fields have large visible gaps, because the text tab has a fixed width. Since the data is dynamic (names, dates, values can be longer or shorter), I can’t reliably determine how wide the field should be ahead of time.

My questions are:

  1. Is there any way for a DocuSign text field to automatically resize (shrink/grow horizontally) based on the value that is injected?

  2. If not, is there a recommended best practice for handling dynamic inline values in legal documents without creating large spacing gaps?

  3. Are anchor-based tabs, replace text, or any other technique supported that avoids fixed-width spacing issues?

The goal is to keep the document visually clean and professional regardless of the length of the injected value.

Thank you in advance for any guidance.

1 reply

Forum|alt.badge.img+6

Hi ​@bakogda,

1- Is there any way for a Docusign text field to automatically resize (shrink/grow horizontally) based on the value that is injected?

Unfortunately, this is not supported. Pre-filled Text tabs have a fixed width defined via the API or UI, and they do not reliably shrink or expand to fit injected values.

2- If not, is there a recommended best practice for handling dynamic inline values in legal documents without creating large spacing gaps?

The recommended approach is to switch from a static PDF template to Docusign Document Generation. This eliminates spacing gaps, as values are rendered as part of the document text.

Document Generation for eSignature: https://support.docusign.com/s/document-item?language=en_US&bundleId=als1679428547895&topicId=ldx1679428689631.html&_LANG=enus

3- Are anchor-based tabs, replace text, or any other technique supported that avoids fixed-width spacing issues?

Anchor tabs are supported for positioning, they place fields relative to the anchor string; width is still fixed. If you need true in-line text substitution, you can use Docusign Document Generation or pre-generate the PDF/Word document on your end before sending.