- 1 - Download this repo
- 2 - Extract the index.js & package.json & package-lock.json
- 3 - Do an
npm i
in terminal
const { ejsToPdf } = require('path_to_index.js');
let data = require('path_to_data.json');
ejsToPdf("path_of_ejs_file.ejs" , data , "path_for_the_output_file.pdf");
Tips: You can use other databases like MySQL or MongoDB as long as data is passed and not undefined