1.2.0 • Published 1 year ago
template_html_to_pdf v1.2.0
template_html_to_pdf 
A NPM package used to create PDF version of html template files
Installation
Install template_html_to_pdf with npm
npm install --save template_html_to_pdf
Usage/Examples
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' } ]
API Reference
Get item
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 |
loadAndGenerateFile()
Returns none;
Authors
Contributing
Contributions are always welcome!
See contributing.md
for ways to get started.
Please adhere to this project's code of conduct
.