From 41a181c376dee5c498542a644b7d82cf3ed0be0e Mon Sep 17 00:00:00 2001 From: Tito Moi Date: Tue, 19 Sep 2023 14:08:31 +0200 Subject: [PATCH] fix: pdf font --- .../report/selection-list-hor/selection-list-hor.component.ts | 2 +- src/app/report/selection-list/selection-list.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/report/selection-list-hor/selection-list-hor.component.ts b/src/app/report/selection-list-hor/selection-list-hor.component.ts index 3fd06178..2ce918de 100644 --- a/src/app/report/selection-list-hor/selection-list-hor.component.ts +++ b/src/app/report/selection-list-hor/selection-list-hor.component.ts @@ -211,7 +211,7 @@ export class SelectionListHorComponent implements OnChanges { const tableId = `table${i}`; autoTable(doc, { html: "#" + tableId, - styles: { font, fontSize: 13 }, + styles: { font, fontSize: 10 }, theme: "plain", margin: firstTable ? { top: 30 } : undefined, didParseCell: (data) => { diff --git a/src/app/report/selection-list/selection-list.component.ts b/src/app/report/selection-list/selection-list.component.ts index 98edfebf..3064a6ec 100644 --- a/src/app/report/selection-list/selection-list.component.ts +++ b/src/app/report/selection-list/selection-list.component.ts @@ -267,7 +267,7 @@ export class SelectionListComponent implements OnChanges { const tableId = `table${i}`; autoTable(doc, { html: "#" + tableId, - styles: { font, fontSize: 13 }, + styles: { font, fontSize: isForPrint ? 10 : 13 }, theme: "plain", margin: this.reportTitle ? { top: 30 } : firstTable ? { top: 10 } : undefined, columnStyles: { 0: { cellWidth: 110 }, 1: { cellWidth: 80 } }, @@ -280,7 +280,7 @@ export class SelectionListComponent implements OnChanges { if (localName === "th") { //the "or" condition is necessary, otherwise pdf is not showed in acrobat reader data.cell.styles.fontStyle = "bold"; - data.cell.styles.fontSize = 14; + data.cell.styles.fontSize = 12; return; } },