Skip to content

Nabeelaron/html_to_pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published