PHPackages                             darkling/invoice - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. darkling/invoice

ActiveLibrary[Payment Processing](/categories/payments)

darkling/invoice
================

Component for generating invoices using Nette Framework and mPDF library.

2.1(5y ago)040BSD-3-ClausePHPPHP &gt;=7.1

Since Oct 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Daaarkling/invoice)[ Packagist](https://packagist.org/packages/darkling/invoice)[ RSS](/packages/darkling-invoice/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

Invoice to PDF
==============

[](#invoice-to-pdf)

Simple tool to generate PDF invoices for Nette Framework. Based on [Eciovni](https://github.com/obrejla/Eciovni) project.

Requirements
------------

[](#requirements)

- [Nette Frameword](http://nette.org/)
- [mPDF](http://mpdf.github.io/)

Installation
------------

[](#installation)

Easiest way to install is to use composer.

```
composer require darkling/invoice
```

Configuration
-------------

[](#configuration)

Just register extension in your config neon file.

```
extensions:
	- Darkling\Invoice\DI\Extension
```

Usage
-----

[](#usage)

Example below shows basic usage. You can also use it inside 'model' class, just demand IExporterFactory dependency. There are four ways which you can handle output file (browser, browser force download, string, save). If you want to change template just provide path to latte file. All should be clear from example.

```
// inside Presenter class

/**
 * @var  IExporterFactory
 * @inject
 */
public $exporterFactory;

public function renderDefault() {

	$supplier = new Participant('Dodavatel Dodavatelovič', 'Ulička', 15, 'Městečko', '555 33');
	$supplier->setIn('562656959')->setTin('CZ562656959')->setAccountNumber('015160/15114');

	$customer = new Participant('Zákazník Zákazníkovič', 'Ulice', 51, 'Město', '333 55');

	$items[] = new Item('Item 1', 2, 100, Tax::fromPercent(21), TRUE);
	$items[] = new Item('Item 2', 1, 50, Tax::fromPercent(21), TRUE, 'kg');

	$data = new Data(1, 'Faktura', $supplier, $customer, new \DateTime('2016-01-01'), new \DateTime('2000-02-01'), $items);
	$data->setVariableSymbol('0101010')->setConstantSymbol('21212121')->setSpecificSymbol('313131313');

	$exporter = $this->exporterFactory->create($data);
	//$exporter->setTemplatePath(__DIR__ . '/path/to/your/template.latte');

	$name = __DIR__ . '/path/where/to/save/file.pdf';
	$pdf = $exporter->exportToPdf($name, Exporter::DEST_SAVE);
}
```

Licence
-------

[](#licence)

New BSD License

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~215 days

Recently: every ~286 days

Total

8

Last Release

2040d ago

Major Versions

1.5 → 2.02018-03-29

PHP version history (2 changes)1.0PHP &gt;=5.6

2.1PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3a1ebc17cd3687e9942c0398a454a8f1753fac05cd4f6ffca1b8a4793d3c412?d=identicon)[Daaarkling](/maintainers/Daaarkling)

---

Top Contributors

[![Daaarkling](https://avatars.githubusercontent.com/u/10207494?v=4)](https://github.com/Daaarkling "Daaarkling (6 commits)")

---

Tags

nettegeneratorinvoicelattempdf

### Embed Badge

![Health badge](/badges/darkling-invoice/health.svg)

```
[![Health](https://phpackages.com/badges/darkling-invoice/health.svg)](https://phpackages.com/packages/darkling-invoice)
```

###  Alternatives

[ondrejbrejla/eciovni

Component for generating invoices using Nette Framework and mPDF library.

277.3k2](/packages/ondrejbrejla-eciovni)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)[pavlista/nette-palette

Palette support for Nette Framework and Latte template engine

1658.6k](/packages/pavlista-nette-palette)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
