invoice
generate pdf invoices from tex templates
Last updated 8 years ago by pkrumins .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install invoice 
SYNC missed versions from official npm registry.

Invoice

Generate pdf invoices from latex!

Example

invoice = require('../index.js');
invoice(
    {
        template: __dirname + '/../templates/browserling-dev-plan.tex',
        from: "Browserling inc\\\\3276 Logan Street\\\\Oakland, CA 94601\\\\USA",
        to: "Google",
        period: "Jan 12 - Feb 12",
        amount: "$20"
    },
    function (err, pdf) {
        if (err) {
            console.log("Failed creating the invoice: " + err);
            return;
        }
        console.log("Pdf invoice: " + pdf);
    }
);

Description

Invoice uses pdflatex to generate pdfs from latex, so make sure you've pdflatex installed.

The invoice function has the following prototype:

invoice(options, cb)

Mandatory options are:

  • template - path to latex template
  • from - from field
  • to - to field
  • period - time period
  • amount - cash amount

Callback is function (err, pdf), where pdf is path to the generated document. If an error occurs, err is set.

Installation

Using npm:

npm install invoice

Current Tags

  • 0.0.1                                ...           latest (8 years ago)

1 Versions

  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |