From 58d5bf7d6c24817150d029813ef0ad3172f4e1cc Mon Sep 17 00:00:00 2001 From: Magnus Schieder <50337967+m-schieder@users.noreply.github.com> Date: Sun, 24 Apr 2022 17:48:40 +0200 Subject: [PATCH] Fix unwanted line break in pdf export (#6408) for inactive linenumbering --- .../app/core/pdf-services/html-to-pdf.service.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/client/src/app/core/pdf-services/html-to-pdf.service.ts b/client/src/app/core/pdf-services/html-to-pdf.service.ts index 1c89e96b1..e322e2773 100644 --- a/client/src/app/core/pdf-services/html-to-pdf.service.ts +++ b/client/src/app/core/pdf-services/html-to-pdf.service.ts @@ -342,11 +342,15 @@ export class HtmlToPdfService { break; } case 'br': { - newParagraph = this.create('text'); - // yep thats all - newParagraph.text = '\n'; - newParagraph.lineHeight = this.LINE_HEIGHT; - break; + if (this.lineNumberingMode === LineNumberingMode.None && classes.includes('os-line-break')) { + break; + } else { + newParagraph = this.create('text'); + // yep thats all + newParagraph.text = '\n'; + newParagraph.lineHeight = this.LINE_HEIGHT; + break; + } } case 'ul': case 'ol': {