fix for pdf generation and \r\n in description

This commit is contained in:
Benjamin Gamard 2018-03-09 17:11:50 +01:00
parent c72f9fbdb1
commit de703531f6

View File

@ -200,7 +200,7 @@ public class PdfUtil {
.addText("Created by " + documentDto.getCreator()
+ " on " + dateFormat.format(new Date(documentDto.getCreateTimestamp())), true)
.newLine()
.addText(documentDto.getDescription())
.addText(Strings.nullToEmpty(documentDto.getDescription()).replaceAll("[\r\n]", ""))
.newLine();
if (!Strings.isNullOrEmpty(documentDto.getSubject())) {
pdfPage.addText("Subject: " + documentDto.getSubject());