2.0.0 • Published 7 years ago

invoice-generator-com v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

Invoice Generator - by invoice-generator.com

It's fully free and easy to use.

e.g.

const fs = require('fs');
const invoicegen = require('invoice-generator-com');

const invoice = {
    logo: "http://invoiced.com/img/logo-invoice.png",
    from: "Invoiced\n701 Brazos St\nAustin, TX 78748",
    to: "Johnny Appleseed",
    currency: "usd",
    number: "INV-0001",
    payment_terms: "Auto-Billed - Do Not Pay",
    items: [
        {
            name: "Subscription to Starter",
            quantity: 1,
            unit_cost: 50
        }
    ],
    fields: {
        tax: "%"
    },
    tax: 5,
    notes: "Thanks for being an awesome customer!",
    terms: "No need to submit payment. You will be auto-billed for this invoice."
}

invoicegen(invoice, 'invoice.pdf')
  .then((PDFbuffer) => {
    let filename = "invoice.pdf"
    fs.writeFile(filename, PDFbuffer, () => console.log("Saved in: " + filename))
  })
  .catch(err => console.log("Error: " + err))

More Information/API: invoice-generator.com