ngs-doo / TemplaterExamples

Creating reports in .NET and Java
https://templater.info
The Unlicense
48 stars 27 forks source link

Line break (\n) issue in pptx templates #57

Closed phinc closed 1 year ago

phinc commented 2 years ago

Input:

Expected output:

Real output:

Looking into pptx doc internals it's seen that the second line is rendered improperly and nested into the first one

</a:solidFill> </a:rPr> text before line break</a:t> </a:solidFill> </a:rPr> text after line break</a:t> </a:r> </a:r>

zapov commented 2 years ago

Hi,

can you pls provide the output document (and a picture of the output) I just tried it and it looks fine to me (by fine I mean its shown in 2 lines on Microsoft PowerPoint)

image

phinc commented 2 years ago

I've attached input template and json data and output file testLineBreak.pptx testLineBreak_6797307978397051756.pptx

phinc commented 2 years ago

input json data { "tag": "text before line break \n text after line break" }

zapov commented 2 years ago

This looks fine to me on my version (two lines). Which Templater version are you using?

zapov commented 2 years ago

image and result image

phinc commented 2 years ago

I'm using Templater 7.1.0 java lib

zapov commented 2 years ago

Tnx for the bug report. Fixed it on master. I'll contact you for a fix

zapov commented 1 year ago

New version has been released. It fixes this problem.