falcon-invoice

0.0.4 • Public • Published

falcon-invoice

Generate PDF invoices using HTML templates and mustaches!

Installation

npm install falcon-invoice

Usage

Check out test/index.js for a more detailed example!

const invoice = require('falcon-invoice')
 
const template = '/path/to/template'
const templateVariables = {
  name: 'Herp Derpington'
}
 
// Optional options
const options = {
  filename: 'differentName.pdf',
  pdfOptions: {
    orientation: 'landscape'
  }
}
 
invoice(template, templateVariables, options)

Template Example

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
  </head>
  <body>
    <p>
      Customer Name: {{name}}
    </p>
  </body>
</html>

Output example

alt text

Credits

This package uses: html-pdf and mustache

I got my test html template from: https://github.com/NextStepWebs/simple-html-invoice-template

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    1
  • 0.0.3
    8
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i falcon-invoice

Weekly Downloads

9

Version

0.0.4

License

MIT

Last publish

Collaborators

  • falconwiz