Articles on: Tutorials

Print a line feed into a document

Render a line feed into a document





The line feed, also known as a "Carriage Return", a "New Line", and the \n character, can be rendered into ODT and DOCX documents with the formatter ":convCRLF”.
Learn more about the formatter: https://carbone.io/documentation.html#convcrlf-



Note: If you need to render HTML line break tags into ODT or DOCX documents, such as <br>, use the :html formatter, learn more about it: https://carbone.io/documentation.html#html-rendering


CRLF Formatter Example




The JSON dataset:


{
  "data": "my blue \n car"
}


Inside the ODT or DOCX template:
{d.data:convCRLF}


After the rendering with Carbone, here is a generated PDF, ODT or DOCX:
my blue
car

Updated on: 09/09/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!