Skip to main content

I have a text tab assigned to a recipient and I’m prefilling its content when creating the envelope via Docusign API. I need to break the line using \n,  but when I add this character in my text, the text tab shows it instead of breaking the line. I also tried \\n, but had no success.

How can I accomplish this?

“\n” is the proper character for a linebreak, but it may be that whatever system you’re using is adding unwanted escape characters. One way to check for this is to: 

  1. Enable API logging as per https://support.docusign.com/s/document-item?language=en_US&rsc_301&bundleId=jux1643235969954&topicId=poz1578456669909.html&_LANG=enus 
  2. Send a test API call with the desired text in the text tab
  3. Download the resulting zip file, check for the CreateEnvelope call (or AddEnvelopeTags if you’re doing it piecemeal) and find the text tab in question - the “value” param will show what exactly is being sent over to Docusign. If it’s not exactly \n then that will give you something to investigate.
example text tab with linebreaks

 

Also, you might check to make sure your tab has a “height” value that’s more than one line tall.


@Drew.Martin thanks for the input! After some investigation, I found that my application was adding an additional backslash, which caused Docusign to display ‘\n’ in the my text and not break the line as I expected. After fixing this issue, I was able to add linebreakers!


Reply