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

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

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

0.15.0(6y ago)12287.9k↓20.7%32MITPHPPHP &gt;=5.4.0CI failing

Since Mar 7Pushed 2y ago4 watchersCompare

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

READMEChangelogDependencies (3)Versions (14)Used By (2)

SwissPaymentSlipPdf - Swiss Payment Slips as PDFs
=================================================

[](#swisspaymentslippdf---swiss-payment-slips-as-pdfs)

[![Travis Build Status](https://camo.githubusercontent.com/704935b8002b15e86d77cd3341d63707c7778c16b0bbe3749e8fff287e2e66be/68747470733a2f2f7472617669732d63692e6f72672f72617661676538342f53776973735061796d656e74536c69705064662e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/ravage84/SwissPaymentSlipPdf)[![Scrutinizer CI Build Status](https://camo.githubusercontent.com/9d48b6206315e2875260086925cfe5f0d2719c857b433e8fc4a43e299c6f6021/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c69705064662f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlipPdf/build-status/master)[![Scrutinizer CI Code Coverage](https://camo.githubusercontent.com/7ad45d48a9423e5580b61eaa8550cdb547a791c12f667c8dff1ecee374d6ff64/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c69705064662f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlipPdf/?branch=master)[![Scrutinizer CI Code Quality](https://camo.githubusercontent.com/7a10e8ac2aab1ac13ebdb4aa9d6bad19aa99d1fc9678026c5eb2dd27b1a5d030/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c69705064662f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlipPdf/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/99141ec278c7bae9954d6c4bbd8eaf7f27f3e772aa0f201e9f35c7c81fe79537/68747470733a2f2f706f7365722e707567782e6f72672f73776973732d7061796d656e742d736c69702f73776973732d7061796d656e742d736c69702d7064662f642f746f74616c2e706e67)](https://packagist.org/packages/swiss-payment-slip/swiss-payment-slip-pdf)[![Latest Stable Version](https://camo.githubusercontent.com/ecc60ab40d735b80b3d4f6940d4fd238a76cbed92a9cab1a1cd77c6cd6c0f9f6/68747470733a2f2f706f7365722e707567782e6f72672f73776973732d7061796d656e742d736c69702f73776973732d7061796d656e742d736c69702d7064662f762f737461626c652e706e67)](https://packagist.org/packages/swiss-payment-slip/swiss-payment-slip-pdf)

Do you need to create Swiss payment slips (called ES or ESR) as PDF files in a project of yours? Then you found almost the right place, go to [SwissPaymentSlipFpdf](https://github.com/ravage84/SwissPaymentSlipFpdf)or [SwissPaymentSlipTcpdf](https://github.com/ravage84/SwissPaymentSlipTcpdf).

If you want to create Swiss payment slips as PDF files in your PHP code base but want to use neither FPDF nor TCPDF, then you can use this project.

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

[](#how-to-use)

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

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)

### 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-pdf": "*"
    }
}
```

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 examples to showcase how to use this middleware class
- Add 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/SwissPaymentSlipPdf/issues).

Author
------

[](#author)

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

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.2% 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 ~209 days

Recently: every ~449 days

Total

13

Last Release

2308d ago

PHP version history (2 changes)0.5.0PHP &gt;=5.3.0

0.14.0PHP &gt;=5.4.0

### Community

Maintainers

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

---

Top Contributors

[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (108 commits)")[![steampilot](https://avatars.githubusercontent.com/u/6819141?v=4)](https://github.com/steampilot "steampilot (2 commits)")

---

Tags

pdfesPayment slipInpayment slipEinzahlungsscheinESR

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[swiss-payment-slip/swiss-payment-slip-fpdf

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

11265.3k](/packages/swiss-payment-slip-swiss-payment-slip-fpdf)[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.3k87.6M278](/packages/barryvdh-laravel-dompdf)[tecnickcom/tcpdf

TCPDF is a PHP class for generating PDF documents and barcodes.

4.5k101.8M473](/packages/tecnickcom-tcpdf)[mpdf/mpdf

PHP library generating PDF files from UTF-8 encoded HTML

4.7k77.1M493](/packages/mpdf-mpdf)[knplabs/knp-snappy

PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage.

4.5k68.3M56](/packages/knplabs-knp-snappy)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

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

PHPackages © 2026

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