invoice-pdf

0.0.11 • Public • Published

Invoice PDF

Create a stripe invoice pdf from a jade template

Installation

Install Phantom

NPM

$ npm install invoice-pdf

Usage

var user = { // coming from Storify database
        username: 'philmod'
    , ...
    , _stripe : {
            ...
        }
};
var options = {};
var invoice = new Invoice(user, options);
invoice.create(function(e,path) {
    // you get the pdf file path
});

Other usages:

  • Render the html:
invoice.render(function(e,html) {
 
});
  • Create PDF from html:
invoice.jade2pdf(function(e,path) {
 
});
  • Delete PDF file:
invoice.deletePdf(function(e) {
 
});
  • Pipe PDF file:
invoice.pipePdf(res);

Run Tests

	$ make test

/invoice-pdf/

    Package Sidebar

    Install

    npm i invoice-pdf

    Weekly Downloads

    5

    Version

    0.0.11

    License

    BSD

    Last publish

    Collaborators

    • storify
    • philmod