From 852d5ae06efb24d3bc1875dd66bd3bf386494518 Mon Sep 17 00:00:00 2001 From: "Engelbart Kai Sven (PEA4-Fe)" Date: Fri, 22 Jan 2021 15:41:40 +0100 Subject: [PATCH] Improve PDF export fonts --- src/app/prediction/prediction.component.ts | 33 ++++++++++++++-------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/app/prediction/prediction.component.ts b/src/app/prediction/prediction.component.ts index bccecec..8f724bf 100644 --- a/src/app/prediction/prediction.component.ts +++ b/src/app/prediction/prediction.component.ts @@ -156,8 +156,16 @@ export class PredictionComponent implements OnInit { { table: { body: [ - [new Date().toLocaleDateString(), 'Security class', 'Person in charge', 'Phone'], - [this.activeGroup.group, 'Intern', + [ + {text: new Date().toLocaleDateString(), style: 'tableHeader'}, + {text: 'Customer', style: 'tableHeader'}, + {text: 'Security class', style: 'tableHeader'}, + {text: 'Person in charge', style: 'tableHeader'}, + {text: 'Phone', style: 'tableHeader'}], + [ + this.activeGroup.group, + this.login.username, + 'Intern', { stack: [ 'CR/APS1-Lotter', @@ -174,11 +182,6 @@ export class PredictionComponent implements OnInit { ] } }, - { - bold: true, - text: 'Customer' - }, - this.login.username, { text: 'Prediction of ' + this.activeGroup.group + ' (' + this.activeGroup.models[this.activeModelIndex].name + ')*', style: 'subheader' @@ -190,7 +193,7 @@ export class PredictionComponent implements OnInit { table: { widths: ['*', 'auto'], body: [ - ['Input Data / Sample Name', 'Prediction*'] + [{text: 'Input Data / Sample Name', style: 'tableHeader'}, {text: 'Prediction*', style: 'tableHeader'}] ].concat(this.prepareExport()) } }, @@ -221,12 +224,15 @@ export class PredictionComponent implements OnInit { { table: { body: [ - ['Pr\u00fcfung', 'Freigabe', 'Datum'], + [{text: 'Pr\u00fcfung', style: 'tableHeader'}, {text: 'Freigabe', style: 'tableHeader'}, {text: 'Datum', style: 'tableHeader'}], ['CR/APS1-Lotter', 'CR/APS1-Lingenfelser', new Date().toLocaleDateString()] ] } }, - '\u00a9 Alle Rechte bei Robert Bosch GmbH, auch f\u00fcr den Fall von Schutzreichtsanmeldungen. Jede Verf\u00fcgungsbefugnis, wie Kopier- und Weitergaberecht, bei uns.' + { + text: '\u00a9 Alle Rechte bei Robert Bosch GmbH, auch f\u00fcr den Fall von Schutzreichtsanmeldungen. Jede Verf\u00fcgungsbefugnis, wie Kopier- und Weitergaberecht, bei uns.', + fontSize: 8 + } ], styles: { header: { @@ -239,7 +245,12 @@ export class PredictionComponent implements OnInit { }, subsubheader: { bold: true - } + }, + tableHeader: { + bold: true, + fontSize: 13, + color: 'black' + } } };