2019.6.5 • Published 5 years ago

@secretboy/pdf v2019.6.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

pdf

v2019.06.05

Generate pdf using handlebars template engine.

Usage

Install the package:

npm install --save @secretboy/pdf

Then use like this:

const sb_pdf = require('@secretboy/pdf')

let pdfRes = await sb_pdf.generate(html, options, pdfOptions, path)

Parameters:

html

  • HTML template in string format.

options

  • Variables to replace in the template. See handlebars templates for more info.

pdfOptions

  • format - String. (default A4)
  • orientation - String. (default portrait)
  • border - String. default(10mm)

path

  • String path for output file.
2019.6.5

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.2

6 years ago

0.0.1

6 years ago