PHPackages                             kinulab/facturx - 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. kinulab/facturx

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

kinulab/facturx
===============

A comprehensible PHP library to write Factur-X/ZUGFeRD XML files

v1.0.13(3y ago)5406[1 issues](https://github.com/kinulab/facturx/issues)MITPHP

Since Jan 10Pushed 3y ago5 watchersCompare

[ Source](https://github.com/kinulab/facturx)[ Packagist](https://packagist.org/packages/kinulab/facturx)[ RSS](/packages/kinulab-facturx/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (15)Used By (0)

Kinulab/Facturx
===============

[](#kinulabfacturx)

This library aims to simplify the generation of Factur-X / ZUGFeRD XML files.

For the moment, this library only generate minimal format.

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

[](#installation)

```
composer require kinulab/facturx
```

Usage
-----

[](#usage)

```
require 'vendor/autoload.php';

$invoice = new \Kinulab\Facturx\CrossIndustryInvoice\CrossIndustryInvoice(
    \Kinulab\Facturx\CrossIndustryInvoice\CrossIndustryInvoice::PROFILE_MINIMUM
);
$invoice->setInvoiceNumber("FC123456789");
$invoice->setInvoiceType(Kinulab\Facturx\CrossIndustryInvoice\CrossIndustryInvoice::INVOICE_TYPE_COMMERCIAL_INVOICE);
$invoice->setIssueDate( new \DateTime('today') );
$invoice->setDueDate( (new \DateTime('today'))->modify('+30 days') );
$invoice->setSeller( new \Kinulab\Facturx\CrossIndustryInvoice\LegalEntity() );
$invoice->setBuyer( new \Kinulab\Facturx\CrossIndustryInvoice\LegalEntity() );
$invoice->setCurrencyCode('EUR');
$invoice->setTaxBasisTotalAmount(100);
$invoice->setTaxTotalAmount(5.61);
$invoice->setGrandTotalAmount( 105.61 );
$invoice->setDuePayableAmount( 105.61 );

$seller = $invoice->getSeller();
$seller->setName('My Company Name');
$seller->setSiret('XXXXXX');
$seller->setVatIdentifier( 'XXXXX');
$seller->setAddress( new \Kinulab\Facturx\CrossIndustryInvoice\Address() );

$sellerAddress = $seller->getAddress();
$sellerAddress->setCountryId('FR');

$buyer = $invoice->getBuyer();
$buyer->setName('The Client');
$buyer->setVatIdentifier("ABC123");

// This is the XML that must be added to the PDF
$xml = \Kinulab\Facturx\CrossIndustryInvoice\XmlWriter::write($invoice);
$pdfFile = './raw-pdf-invoice/invoice-FC123456789.pdf'; // my invoice in PDF format

$facturx = new \Atgp\FacturX\Facturx();
$electronicInvoice = $facturx->generateFacturxFromFiles($pdfFile, $xml);
// $electronicInvoice is your invoice in Factur-x/ZUGFeRD format

file_put_contents('./facturx-invoice/invoice-FC123456789.pdf', $electronicInvoice);
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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 ~17 days

Recently: every ~35 days

Total

14

Last Release

1354d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b12ed423a03cfb7eb41e4a0b5c1182ab30271cfc4f3f3e5962bb73873aca37f?d=identicon)[nykopol](/maintainers/nykopol)

---

Top Contributors

[![nykopol](https://avatars.githubusercontent.com/u/2706685?v=4)](https://github.com/nykopol "nykopol (16 commits)")

### Embed Badge

![Health badge](/badges/kinulab-facturx/health.svg)

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

###  Alternatives

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.2k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M100](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M215](/packages/smalot-pdfparser)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M128](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)

PHPackages © 2026

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