Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ardean/pdf-invoice-simple

A Simple PDF Invoice Template
https://github.com/ardean/pdf-invoice-simple

pdf pdf-invoice pdf-template

Last synced: 4 days ago
JSON representation

A Simple PDF Invoice Template

Awesome Lists containing this project

README

        

# pdf-invoice-simple
[![NPM Version][npm-image]][downloads-url] [![NPM Downloads][downloads-image]][downloads-url]

**A Simple PDF Invoice Template**

Currently german only.

## Usage

```javascript
import moment from "moment";
import simpleInvoice from "pdf-invoice-simple";

simpleInvoice({
invertHeader: true,
organizationAddress: {
name: "Orbin",
street: "Strasse 333",
postCode: "3474",
city: "Stadt"
},
billingAddress: {
name: "Mein Kontakt",
attn: "Mr. Melk",
street: "Strasse 2",
postCode: "78556",
city: "Andere Stadt"
},
date: moment(),
dueDate: moment().add(12, "days"),
invoiceNumber: 12,
customerName: "MyCompany GmbH",
items: [{
name: "Item Name",
description: "Item Description",
quantity: 2,
rate: 200,
total: 400
}, {
name: "Item Name 2",
quantity: 2,
rate: 200,
total: 400
}],
subTotal: 400,
taxGroups: [{
name: "Mehrwertsteuer",
amount: 10
}],
adjustment: 20,
total: 430,
currency: "EUR",
note: "Meine Notiz"
}).download("invoice.pdf");
```

## License

[MIT](LICENSE)

[downloads-image]: https://img.shields.io/npm/dm/pdf-invoice-simple.svg
[downloads-url]: https://npmjs.org/package/pdf-invoice-simple
[npm-image]: https://img.shields.io/npm/v/pdf-invoice-simple.svg
[npm-url]: https://npmjs.org/package/pdf-invoice-simple