diff --git a/src/PdfCreator.ts b/src/PdfCreator.ts index 3fa95a8..4ccd919 100644 --- a/src/PdfCreator.ts +++ b/src/PdfCreator.ts @@ -8,10 +8,11 @@ import path from 'path'; export class PdfCreator { private templateDir = path.join(__dirname, '/templates'); + //TODO: Accept the runner class public async generateSponsoringContract(): Promise { - const template = fs.readFileSync(`${this.templateDir}/sponsoring_contract.html`, 'utf8'); - let pdf = await pdf_converter.create(template, { format: "A5", orientation: "landscape" }); - return await this.toBuffer(pdf); + let template = fs.readFileSync(`${this.templateDir}/sponsoring_contract.html`, 'utf8'); + template = template.replace("{{Runner Name}}", "lelele"); + return await pdf_converter.create(template, { format: "A5", orientation: "landscape" }); } /**