intive-FDV / DynamicJasper

Dynamic Reports using Jasper Reports
http://intive-fdv.github.io/DynamicJasper/
GNU Lesser General Public License v3.0
244 stars 128 forks source link

AutoText cuts off after line break #146

Open Chrissyx opened 4 months ago

Chrissyx commented 4 months ago

By adding some text like this:

DynamicReportBuilder dynamicReportBuilder = new DynamicReportBuilder();
dynamicReportBuilder.setPageSizeAndOrientation(Page.Page_A4_Portrait())
AutoText autoText = new AutoText("Header 1\\nHeader2\\n", AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT, 480);
autoText.setStyle(...);
dynamicReportBuilder.addAutoText(autoText);

Both lines are printed. This always worked up to version 5.3.6. But something is broken since 5.3.7 regarding the line break handling. Newer versions just cut off everything after the first \n so only the first line of text is printed.