PHPackages                             copainfo/invoice-module - 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. copainfo/invoice-module

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

copainfo/invoice-module
=======================

Module qui permet de généré des factures

V1.1.0(3y ago)077OSL-3.0HackPHP ^8.1

Since May 17Pushed 2y agoCompare

[ Source](https://github.com/Copainfo/invoice-module)[ Packagist](https://packagist.org/packages/copainfo/invoice-module)[ RSS](/packages/copainfo-invoice-module/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (0)

InvoiceModule
=============

[](#invoicemodule)

InvoiceModule est un générateur de facture au format PDF.

Ce générateur est en php **8.1**.

Il s'appuie sur la librairie [Html2Pdf](https://github.com/spipu/html2pdf) qui permet de faire la conversion d'un code HTML 4.01 en PDF.

Configuration requise
---------------------

[](#configuration-requise)

InvoiceModule fonctionne avec PHP &gt;8.1 et Composer.

Vous aurez également besoin d'avoir au minimum les extensions php suivantes :

- gd
- mbstring

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

[](#installation)

Vous devez utiliser Composer pour installer InvoiceModule.

Si vous ne savez pas ce qu'est Composer :

- Vous pouvez trouver la documentation sur
- Vous pouvez trouver tous les paquets disponibles sur

```
composer require copainfo/invoice-module
```

Utilisation
-----------

[](#utilisation)

Pour la customisation des Factures il y a besoin de deux modifications de votre part :

- [Les templates](./Docs/Template.md)
- [Le detailsTableInterface](./Docs/DetailstableIterface.md)

Exemple
-------

[](#exemple)

### Template

[](#template)

Un exemple de template est disponible ici : [Template](./exemple/ExempleTemplate.php)

Ce template génère une facture sans paramètre ressemble à ce fichier : [Pdf](./exemple/ExampleTemplateRender.pdf)

### Interface

[](#interface)

Un exemple d'interface est disponible ici : [Interface](./src/DetailsTableExemple.php)

Cette interface génère une facture qui ressemble à ce fichier : [Pdf](./exemple/ExempleWithInterface.pdf)

### Utilisation

[](#utilisation-1)

Exemple d'utilisation avec l'interface d'exemple.

```
$detail = new DetailsTableExemple(); // On crée un Objet Qui implement l'interface
$builder = new InvoiceBuilder($detail); // On crée un invoiceBuilder
$detail->setProductList([ // On ajoute des produits au tableau des produits
    [
        "product"=>"Product 1",
        "description"=>"first Product",
        "PUHT"=>100,
        "TVA"=>20,
        "quantity"=>2,
        ],
    [
        "product"=>"Product 2",
        "description"=>"next Product",
        "PUHT"=>100,
        "TVA"=>20,
        "quantity"=>2,
    ]
]);
$builder->setInvoiceInfo("1", "Test", new DateTime());  // On donne les informations de la facture
$builder->setIssuerInfo( // On donne les informations de l'entreprise
    "Nom de l'entreprise",
    "25 rue de l'adresse ",
    "65214 VilleIci",
    "06 06 06 06 06",
    "900 367 004 00653",
    "SARL",
    "1000 €",
    "VilleIci",
    "900 367 004 00653",
    "900 367 004 00653"
);
$builder->setCustomerInfo(// On donne les informations du client
    "Nom du client",
    "65 rue de l'adresse",
    "65214 VilleIci",
    "06 06 06 06 06",
    "mail@mail.com",
);
$invoicePdf = $builder->getInvoice( // Ici, on crée la facture
                        "TestTemplate", // avec le template : TestTemplate.
                        ["LOGOSRC" => "./logo.png"]  // on donne les valeurs des paramètres personnalisés
                        );
```

La fonction méthode getInvoice permet de retourner le contenu du fichier PDF.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

1095d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d7d88bb90c5b2e25858e2d675f1e60fa74d7f5defce88f47bbe55998362bff1?d=identicon)[Quentin51100](/maintainers/Quentin51100)

![](https://avatars.githubusercontent.com/u/82868611?v=4)[Mxmm3](/maintainers/Mxmm3)[@Mxmm3](https://github.com/Mxmm3)

---

Top Contributors

[![Quentin51100](https://avatars.githubusercontent.com/u/71220608?v=4)](https://github.com/Quentin51100 "Quentin51100 (18 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[phpoffice/phpspreadsheet

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

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

Convert a webpage to an image or pdf using headless Chrome

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

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

2.7k34.5M216](/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.6M131](/packages/openspout-openspout)[setasign/tfpdf

This class is a modified version of FPDF that adds UTF-8 support. The latest version is based on FPDF 1.85.

426.1M30](/packages/setasign-tfpdf)

PHPackages © 2026

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