PHPackages                             loskoderos/faktura-php - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. loskoderos/faktura-php

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

loskoderos/faktura-php
======================

Generate pretty PDF invoices in PHP

113404PHP

Since Dec 21Pushed 3y ago2 watchersCompare

[ Source](https://github.com/loskoderos/faktura-php)[ Packagist](https://packagist.org/packages/loskoderos/faktura-php)[ RSS](/packages/loskoderos-faktura-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Faktura PHP
===========

[](#faktura-php)

Generate pretty PDF invoices in PHP

What is this?
-------------

[](#what-is-this)

Faktura in polish means invoice and this library is created to render pretty invoices in PHP.

Faktura is a simple standalone PHP library for rendering PDF invoices in PHP. You can easily integrate it into your own project using standard tools like composer. Currently, Faktura depends on *xvfb* and *wkhtmltopdf* to create PDF files. Faktura has builtin rendering based on native PHP templates that can be customized with plugin functions.

Sample PDF invoice: [https://github.com/loskoderos/faktura-php/blob/master/examples/simple\_invoice\_pl.pdf](https://github.com/loskoderos/faktura-php/blob/master/examples/simple_invoice_pl.pdf)[![sample](https://raw.githubusercontent.com/loskoderos/faktura-php/master/examples/screenshot1.png)](https://raw.githubusercontent.com/loskoderos/faktura-php/master/examples/screenshot1.png)

Basic usage
-----------

[](#basic-usage)

Faktura is simple to use and it lets you to map an invoice structure and customize it to your needs.

```
use LosKoderos\Faktura\Faktura;

$faktura = new Faktura();

$invoice = $faktura->newInvoice();
$invoice->setInvoiceReference('INV/123/2018');

//...

$invoice->newItem()
    ->setDescription('Some item on the invoice')
    ->setUnitNetPrice(123)
    ;

//...

$faktura->setTemplate('path_to_your_invoice_template.phtml');
$faktura->export($invoice, 'invoice.pdf');
```

Have a look into *examples* folder to see the full example: [https://github.com/loskoderos/faktura-php/blob/master/examples/simple\_invoice\_pl.php](https://github.com/loskoderos/faktura-php/blob/master/examples/simple_invoice_pl.php)

Features
--------

[](#features)

- Standalone library, no external PHP frameworks needed.
- Easily integrates with others.
- Builtin templating using native PHP templates.
- Builtin support for UTF-8 and images.
- Extend template rendering with custom plugin functions.
- Invoice structure can be customized, you can add custom fields to fit your needs.
- Invoice can be serialized to save it in database for accounting purposes.
- You can easily customize the library with overrides.

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

[](#installation)

Faktura is still under development, however if you want to try it out you can easily install it with Composer:

```
composer config minimum-stability dev
composer require loskoderos/faktura-php:dev-master

```

Before you use it, you need to take care of a couple od system dependencies. You'll need to install Xvfb and Wkhtmltopdf, on Ubuntu run:

```
sudo apt-get install xvfb wkhtmltopdf

```

To confirm, all is good, run the example:

```
php examples/simple_invoice_pl.php

```

It should finish without any error and generate *examples/simple\_invoice\_pl.pdf*.

Contributing
------------

[](#contributing)

Contributions are welcome, please submit a pull request.

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33357303?v=4)[Los Koderos](/maintainers/loskoderos)[@loskoderos](https://github.com/loskoderos)

---

Top Contributors

[![cepa](https://avatars.githubusercontent.com/u/425351?v=4)](https://github.com/cepa "cepa (32 commits)")

### Embed Badge

![Health badge](/badges/loskoderos-faktura-php/health.svg)

```
[![Health](https://phpackages.com/badges/loskoderos-faktura-php/health.svg)](https://phpackages.com/packages/loskoderos-faktura-php)
```

###  Alternatives

[42coders/document-templates

Document template management package.

19940.0k](/packages/42coders-document-templates)[qipsius/tcpdf-bundle

A bundle to easily integrate TCPDF into Symfony

23749.5k](/packages/qipsius-tcpdf-bundle)[macopedia/magmi2

Magento Mass Importer 'Magmi' for Magento 2

11615.7k](/packages/macopedia-magmi2)[tarfin-labs/easy-pdf

Makes pdf processing easy.

1719.4k](/packages/tarfin-labs-easy-pdf)[akeneo-labs/excel-connector-bundle

Akeneo PIM Excel connector bundle

166.4k](/packages/akeneo-labs-excel-connector-bundle)

PHPackages © 2026

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