feature: generate pdf from actor

This commit is contained in:
Matthieu CAILLEAUX
2021-10-18 00:35:13 +02:00
parent f96372b236
commit 145207a1c5
14 changed files with 391 additions and 138 deletions

View File

@@ -69,7 +69,7 @@ export class LabelledValues extends Row {
}
}
public render(doc: jsPDF, maxWidth?: number): jsPDF {
public prepareRender(doc: jsPDF, maxWidth?: number): jsPDF {
const pageWidth = doc.internal.pageSize.width;
const rowWidth = pageWidth - this.x - MARGINS.right;
for (const column of this.elements) {
@@ -77,6 +77,10 @@ export class LabelledValues extends Row {
labelledValue.maxWidth = rowWidth / this.nbrOfCol;
}
}
return super.render(doc, maxWidth);
return super.prepareRender(doc, maxWidth);
}
public render(doc: jsPDF, _maxWidth?: number): jsPDF {
return doc;
}
}