styling pdf document

This commit is contained in:
Frank Knoll
2024-07-16 12:29:47 +02:00
parent 6da66658b6
commit 4312a81eda
4 changed files with 8 additions and 6 deletions

View File

@@ -47,11 +47,11 @@ class PageInitializer {
return prrBySymptomTableView;
}
static #configurePDFButton({ pdf: { pdfButton, valueName }, symptom, vaccine }) {
static #configurePDFButton({ pdf: { pdfButton, heading, valueName }, symptom, vaccine }) {
pdfButton.addEventListener(
'click',
() => PdfCreator
.createPdf({ symptom, vaccine, valueName })
.createPdf({ symptom, vaccine, heading, valueName })
.open());
}
}

View File

@@ -1,10 +1,10 @@
class PdfCreator {
static createPdf({ symptom, vaccine, valueName }) {
static createPdf({ symptom, vaccine, heading, valueName }) {
const documentDefinition = {
content: [
{
text: 'EU Safety Signal (All drugs)',
text: heading,
fontSize: 18,
alignment: 'center',
margin: [0, 0, 0, 20],