PHPackages                             swiss-payment-slip/swiss-payment-slip-fpdf - 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. swiss-payment-slip/swiss-payment-slip-fpdf

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

swiss-payment-slip/swiss-payment-slip-fpdf
==========================================

Create Swiss payment slips with reference number (ESR) or without (ES) as PDFs with FPDF

0.6.0(11y ago)11265.3k↓20.2%6MITPHPPHP &gt;=5.3.0

Since Mar 7Pushed 5y ago5 watchersCompare

[ Source](https://github.com/ravage84/SwissPaymentSlipFpdf)[ Packagist](https://packagist.org/packages/swiss-payment-slip/swiss-payment-slip-fpdf)[ Docs](https://github.com/ravage84/SwissPaymentSlipFpdf)[ RSS](/packages/swiss-payment-slip-swiss-payment-slip-fpdf/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

SwissPaymentSlipFpdf - Swiss Payment Slips with FPDF
====================================================

[](#swisspaymentslipfpdf---swiss-payment-slips-with-fpdf)

[![Travis Build Status](https://camo.githubusercontent.com/2f4cb76e04842836d374374db4a3e0375a21c68e2151ee2fa499916057fe7328/68747470733a2f2f7472617669732d63692e6f72672f72617661676538342f53776973735061796d656e74536c6970467064662e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/ravage84/SwissPaymentSlipFpdf)[![Scrutinizer CI Build Status](https://camo.githubusercontent.com/ca50c2fe62cccbfeadf3c8b4b5c5930f4def532a7286abf913369b145cf02703/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c6970467064662f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlipFpdf/build-status/master)[![Scrutinizer CI Code Coverage](https://camo.githubusercontent.com/5f76cf6a6b3319242165728222f501c9a3885ac9802aec33af2811581c3e459f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c6970467064662f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlipFpdf/?branch=master)[![Scrutinizer CI Code Quality](https://camo.githubusercontent.com/6debebb761a9ea1b1bc15b9b494b6befc0207a498e13fa934287fb25783ec911/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c6970467064662f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlipFpdf/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/a498f9ae90eb58b99810927714821c21a40e02698b06b37b0631bbd3435fb9e9/68747470733a2f2f706f7365722e707567782e6f72672f73776973732d7061796d656e742d736c69702f73776973732d7061796d656e742d736c69702d667064662f642f746f74616c2e706e67)](https://packagist.org/packages/swiss-payment-slip/swiss-payment-slip-fpdf)[![Latest Stable Version](https://camo.githubusercontent.com/b77f64ae854eeec8a0cbec14f2a15bb0c79855afaa79c60ca2dc65a08522d1a2/68747470733a2f2f706f7365722e707567782e6f72672f73776973732d7061796d656e742d736c69702f73776973732d7061796d656e742d736c69702d667064662f762f737461626c652e706e67)](https://packagist.org/packages/swiss-payment-slip/swiss-payment-slip-fpdf)

Do you need to create Swiss payment slips (called ESR) as PDF files in a project of yours? Then you found the right place, read on...

By the way if you don't like [FPDF](http://www.fpdf.org) or don't want to use it for whatever reason, checkout [SwissPaymentSlipTcpdf](https://github.com/ravage84/SwissPaymentSlipTcpdf/).

How to use
----------

[](#how-to-use)

Just install the package (see [Installation](https://github.com/ravage84/SwissPaymentSlipFcpdf#installation)) and check out the contained examples in the [examples folder](https://github.com/ravage84/SwissPaymentSlipFcpdf/tree/master/examples).

How to extend for custom needs
------------------------------

[](#how-to-extend-for-custom-needs)

\[TODO\] If you need help, ask for help.

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

[](#installation)

### Requirements

[](#requirements)

- PHP 5.4.x+
- [SwissPaymentSlip](https://github.com/ravage84/SwissPaymentSlip/) (automatically installed by Composer)
- [SwissPaymentSlipPdf](https://github.com/ravage84/SwissPaymentSlipPdf/) (automatically installed by Composer)

### Composer

[](#composer)

Just [install composer](http://getcomposer.org/doc/00-intro.md#system-requirements) on your system, if not already there. Then create a [composer.json](http://getcomposer.org/doc/04-schema.md) file in your project's root folder and copy the following into it:

```
{
    "require": {
        "swiss-payment-slip/swiss-payment-slip-fpdf": "*"
    }
}
```

After that you can install the package using

```
$ php composer.phar install

```

in your project's root folder.

Background Story
----------------

[](#background-story)

In february 2013 I was looking for a solution to create swiss payment slips for a project I had to do at my work place. After a short Google search I came across Manuel Reinhard's [blog post](http://sprain.ch/blog/downloads/class-esr-besr-einzahlungsschein-php/) about the class he made for that. On his [Github project's page](https://github.com/sprain/class.Einzahlungsschein.php) I found [Peter Siska's](https://github.com/peschee) [pull request](https://github.com/sprain/class.Einzahlungsschein.php/pull/5). His pull request introduced PSR-0 compatibility and he created a composer package on [Packagist](http://packagist.org/). So I tried Peter's version and it suited my basic needs.

BUT since the customer I was working for used custom designed payment slips I couldn't use Manuel's/Peter's script since it wasn't flexible enough. Now I had to decide whether I want to "just" change the script to fit my needs or to rewrite it and make it as flexible as possible. I decided myself for the latter.

TODOs
-----

[](#todos)

- Improve code documentation
- Add more examples/improve existing ones
- Write tests
- Release the stable release of the API

Submitting bugs and feature requests
------------------------------------

[](#submitting-bugs-and-feature-requests)

Bugs and feature request are tracked on [GitHub](https://github.com/ravage84/SwissPaymentSlipFpdf/issues).

Author
------

[](#author)

This project was created by [Marc Würth](https://github.com/ravage84). See Background Story for more details.

License
-------

[](#license)

SwissPaymentSlipFpdf is licensed under the MIT License. See the [LICENSE](https://github.com/ravage84/SwissPaymentSlipFpdf/blob/master/LICENSE) file for details.

Thanks to
---------

[](#thanks-to)

-  for OCRB font
-  for FPDF font converter

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50.5% 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 ~755 days

Total

2

Last Release

4065d ago

### Community

Maintainers

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

---

Top Contributors

[![steampilot](https://avatars.githubusercontent.com/u/6819141?v=4)](https://github.com/steampilot "steampilot (46 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (41 commits)")[![TekkCraft](https://avatars.githubusercontent.com/u/21214298?v=4)](https://github.com/TekkCraft "TekkCraft (3 commits)")[![lpmi-13](https://avatars.githubusercontent.com/u/5070516?v=4)](https://github.com/lpmi-13 "lpmi-13 (1 commits)")

---

Tags

pdffpdfesPayment slipInpayment slipEinzahlungsscheinESR

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/swiss-payment-slip-swiss-payment-slip-fpdf/health.svg)

```
[![Health](https://phpackages.com/badges/swiss-payment-slip-swiss-payment-slip-fpdf/health.svg)](https://phpackages.com/packages/swiss-payment-slip-swiss-payment-slip-fpdf)
```

###  Alternatives

[swiss-payment-slip/swiss-payment-slip-pdf

An abstract base class for creating Swiss payment slips with reference number (ESR) or without (ES) using a pdf engine

12287.9k2](/packages/swiss-payment-slip-swiss-payment-slip-pdf)[setasign/fpdi

FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.

1.2k142.4M231](/packages/setasign-fpdi)[setasign/fpdf

FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.

76863.8M227](/packages/setasign-fpdf)[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)[tmw/fpdm

PDF form filling using FPDM Class written by FPDF author Olivier

129623.6k3](/packages/tmw-fpdm)[fpdf/fpdf

FPDF Composer Wrapper

512.7M22](/packages/fpdf-fpdf)

PHPackages © 2026

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