Categories > OpenTBS with DOCX >

Word wrap (new line)

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Jonas
Date: 2012-10-10
Time: 17:59

Word wrap (new line)

Hi evryone,

I am having a poblem with TBS when trying to merge with an MS office file. I use the method [onshow.variablename] to insert the variable content in the office file. However this text has many word wraps, and those wraps are not correctly processed. As the text is justified in the template, it ruins the layout, forcing me to correct this manually.

So I would like to know how to specify in the PHP code to use a newline... As you guys might know, we usually use <br> or <n> but these do not work, TBS takes it as a text and insert it in the MS office file.

Thank you very much by advance !

Jonas
By: Skrol29
Date: 2012-10-12
Time: 00:12

Re: Word wrap (new line)

Hi Jonas,

<br> is an HTML tag. They are merged as normal text.

But OpenTBS should automatically convert PHP new-lines  ("\n", "\r\n", "\r") into Ms Word new-lines.
It works also for data coming from databases.