This is my code. I am using pdfkit. So, instead of sending a text I want to send an HTML template with dynamic data. Right now I am using doc.text('my text11111'). Can we replace it with a template?
var PDFDocument = require('pdfkit');
var doc = new PDFDocument({
size: 'letter'
});
doc.pipe(fs.createWriteStream('will.pdf'));
doc.text('my text11111')
doc.end();