From 557cc26f281da0b47621dff667435a788c42c103 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Tue, 2 Feb 2021 10:01:31 +0100 Subject: [PATCH] Added Barebones pdf creator class ref #3 --- src/PdfCreator.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/PdfCreator.ts diff --git a/src/PdfCreator.ts b/src/PdfCreator.ts new file mode 100644 index 0000000..1650c79 --- /dev/null +++ b/src/PdfCreator.ts @@ -0,0 +1,14 @@ +import fs from "fs"; +import path from 'path'; + +/** + * This class is responsible for all things pdf creation. + * This uses the html templates from src/templates. + */ +export class PdFCreator { + private templateDir = path.join(__dirname, '/templates'); + + public generateSponsoringContract() { + const template = fs.readFileSync(`${this.templateDir}/sponsoring_contract.html`, 'utf8'); + } +}