template_html_to_pdf

1.2.0 • Public • Published

template_html_to_pdf MIT License

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

@Nabeelaron

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

Package Sidebar

Install

npm i template_html_to_pdf

Weekly Downloads

0

Version

1.2.0

License

ISC

Unpacked Size

56.7 kB

Total Files

30

Last publish

Collaborators

  • nabeel_aron