Skip to main content
Participant
June 5, 2023
Answered

Merged Fields Being Cut Off

  • June 5, 2023
  • 1 reply
  • 716 views

I have an agreement that I have built out in an HTML file and, with tags embeded throughout the file, I am passing the merged fields with the document when sending to the Adobe Sign API.  My issue, though, is that all of the fields seem to be the same length and no matter the length of the text, the fields do not change length in the PDF that is generated, resulting in cut-off text (examples attatched)

This topic has been closed for replies.
Correct answer C. Stewart - CE Engineer

Hi Ryan29618474lcqi, thank you for reaching out to the community for help. I think the following sections in the Acrobat Sign Text Tag Guide will be helpful for your purposes here: "Field Length and Formatting" and "Controlling field size with directives.

 

Form fields are rendered to the length of the text tags themselves and aren't automatically resized. This is because the field could be rendered over text from the underlying document. However you could use javascript to dynamically insert a number of spaces after the opening brackets correspondent with the length of the entered value.

 

Alternatively, and perhaps more generally applicable, you could find the average width of a character for the font and font size of the form field, and use it in the second option mentioned above to dynamically determine the width of the field.

 

I hope this helps, and please do reply with more details of your use case if these solutions don't meet your needs.

 

Cheers,

Cole

1 reply

C. Stewart - CE Engineer
Adobe Employee
Adobe Employee
June 5, 2023

Hi Ryan29618474lcqi, thank you for reaching out to the community for help. I think the following sections in the Acrobat Sign Text Tag Guide will be helpful for your purposes here: "Field Length and Formatting" and "Controlling field size with directives.

 

Form fields are rendered to the length of the text tags themselves and aren't automatically resized. This is because the field could be rendered over text from the underlying document. However you could use javascript to dynamically insert a number of spaces after the opening brackets correspondent with the length of the entered value.

 

Alternatively, and perhaps more generally applicable, you could find the average width of a character for the font and font size of the form field, and use it in the second option mentioned above to dynamically determine the width of the field.

 

I hope this helps, and please do reply with more details of your use case if these solutions don't meet your needs.

 

Cheers,

Cole

Participant
June 6, 2023

I was able to solve my issue with the help of the link that you provided by wrapping my adobe tags with a <pre> tag and adding the neccessary whitespaces within the adobe tag.

 

I appreciate your help!