Improve PDF export fonts

This commit is contained in:
Kai S. K. Engelbart 2021-01-22 15:41:40 +01:00
parent 999f0b2937
commit 852d5ae06e

View File

@ -156,8 +156,16 @@ export class PredictionComponent implements OnInit {
{ {
table: { table: {
body: [ 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: [ stack: [
'CR/APS1-Lotter', '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 + ')*', text: 'Prediction of ' + this.activeGroup.group + ' (' + this.activeGroup.models[this.activeModelIndex].name + ')*',
style: 'subheader' style: 'subheader'
@ -190,7 +193,7 @@ export class PredictionComponent implements OnInit {
table: { table: {
widths: ['*', 'auto'], widths: ['*', 'auto'],
body: [ body: [
['Input Data / Sample Name', 'Prediction*'] [{text: 'Input Data / Sample Name', style: 'tableHeader'}, {text: 'Prediction*', style: 'tableHeader'}]
].concat(this.prepareExport()) ].concat(this.prepareExport())
} }
}, },
@ -221,12 +224,15 @@ export class PredictionComponent implements OnInit {
{ {
table: { table: {
body: [ 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()] ['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: { styles: {
header: { header: {
@ -239,6 +245,11 @@ export class PredictionComponent implements OnInit {
}, },
subsubheader: { subsubheader: {
bold: true bold: true
},
tableHeader: {
bold: true,
fontSize: 13,
color: 'black'
} }
} }
}; };