DynamicJasper icon indicating copy to clipboard operation
DynamicJasper copied to clipboard

AutoText cuts off after line break

Open Chrissyx opened this issue 7 months ago • 0 comments

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.

Chrissyx avatar Jul 22 '24 08:07 Chrissyx