jsreport / jsreport-docx

jsreport recipe rendering word docx
MIT License
10 stars 3 forks source link

Rendering removes newlines in Word documents #18

Closed christophbrgr closed 4 years ago

christophbrgr commented 4 years ago

Hi,

We're having an issue where text containing newlines is not formatted correctly in the resulting document.

If we have a word document with this, for example:

{{ content }} 

with content being something like:

this
is 

a test

will be rendered as:

this  is   a test

Is there a way to explicitly insert a line break into text which will be inserted into placeholders? So far, I have tried to replace newlines in the raw text explicitly with Word newlines (e.g. <w:br/> and the like) but those are obviously escaped before the rendering.

Thanks a lot for your help!

pofider commented 4 years ago

Hi,

please see the solution described here https://github.com/jsreport/jsreport/issues/713

christophbrgr commented 4 years ago

Thanks a lot!