A NPM package used to create PDF version of html template files
Install template_html_to_pdf with npm
npm install --save template_html_to_pdf
import { loadAndGenerateFile } from "template_html_to_pdf";
import { fileURLToPath } from "url";
import * as path from "path";
loadAndGenerateFile(path.dirname(fileURLToPath(import.meta.url)));
OUTPUT
Load success ✅
Compile success ✅
[ { status: true, message: 'PDF generated' } ]
loadAndGenerateFile(source,destination,metadata)
Parameter | Type | Description |
---|---|---|
source |
string |
Optional. source directory relative to caller function |
destination |
string |
Optional. destination directory relative to caller function for generated files |
metadata |
object |
Optional. extra data for template compilation |
Returns none;
Contributions are always welcome!
See contributing.md
for ways to get started.
Please adhere to this project's code of conduct
.