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

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

swiss-payment-slip/swiss-payment-slip-tcpdf
===========================================

Create Swiss payment slips with reference number (ESR) as PDFs with TCPDF

0.14.0(6y ago)717.8k↓50%5MITPHPPHP &gt;=5.4.0

Since Feb 23Pushed 3y ago2 watchersCompare

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

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

SwissPaymentSlipTcpdf - Swiss Payment Slips with TCPDF
======================================================

[](#swisspaymentsliptcpdf---swiss-payment-slips-with-tcpdf)

[![Travis Build Status](https://camo.githubusercontent.com/ad9921263fba7b8350009104eb7f6fd48645d250db81461195c31961b5936df8/68747470733a2f2f7472617669732d63692e6f72672f72617661676538342f53776973735061796d656e74536c697054637064662e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/ravage84/SwissPaymentSlipTcpdf)[![Scrutinizer CI Build Status](https://camo.githubusercontent.com/305f32c657d820b8e70abd93813205628e867ccbf61bff43a546d1710bcfea70/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c697054637064662f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlipTcpdf/build-status/master)[![Scrutinizer CI Code Coverage](https://camo.githubusercontent.com/e5991413fa4b8db455c6780ab10c5d6f5d3e1654ef822c02fb4a00b6d388cfed/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c697054637064662f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlipTcpdf/?branch=master)[![Scrutinizer CI Code Quality](https://camo.githubusercontent.com/166b48df847251e9d1c9ff318d04f35b28aa0a83de61937ce03b8cf2755327ba/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f53776973735061796d656e74536c697054637064662f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/SwissPaymentSlipTcpdf/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/5141fd279a1c89726b46015298b9ff451f74772d34eb805ead377a0c27e119e7/68747470733a2f2f706f7365722e707567782e6f72672f73776973732d7061796d656e742d736c69702f73776973732d7061796d656e742d736c69702d74637064662f642f746f74616c2e706e67)](https://packagist.org/packages/swiss-payment-slip/swiss-payment-slip-tcpdf)[![Latest Stable Version](https://camo.githubusercontent.com/2f5665d847d6fdcf8da405a758ac8429b243a61ff1c63fd840b3fe2fb1f7b137/68747470733a2f2f706f7365722e707567782e6f72672f73776973732d7061796d656e742d736c69702f73776973732d7061796d656e742d736c69702d74637064662f762f737461626c652e706e67)](https://packagist.org/packages/swiss-payment-slip/swiss-payment-slip-tcpdf)

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 [TCPDF](http://www.tcpdf.org/) or don't want to use it for whatever reason, checkout [SwissPaymentSlipFpdf](https://github.com/ravage84/SwissPaymentSlipFpdf/).

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

[](#how-to-use)

Just install the the package (see [Installation](https://github.com/ravage84/SwissPaymentSlipTcpdf#installation)) and check out the contained examples in the [examples folder](https://github.com/ravage84/SwissPaymentSlipTcpdf/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.3.x+
- [SwissPaymentSlip](https://github.com/ravage84/SwissPaymentSlip/) (automatically installed by Composer)
- [SwissPaymentSlipPdf](https://github.com/ravage84/SwissPaymentSlipPdf/) (automatically installed by Composer)
- A [TCPDF compatible](http://www.tcpdf.org/fonts.php) [OCR-B](http://en.wikipedia.org/wiki/OCR-B) font for the code line, see issue #1

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

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/SwissPaymentSlipTcpdf/issues).

Author
------

[](#author)

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

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.4% 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 ~158 days

Recently: every ~449 days

Total

17

Last Release

2308d ago

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

0.13.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 (143 commits)")[![sprain](https://avatars.githubusercontent.com/u/260361?v=4)](https://github.com/sprain "sprain (15 commits)")[![D4rkMindz](https://avatars.githubusercontent.com/u/16854141?v=4)](https://github.com/D4rkMindz "D4rkMindz (1 commits)")[![steampilot](https://avatars.githubusercontent.com/u/6819141?v=4)](https://github.com/steampilot "steampilot (1 commits)")

---

Tags

pdfTCPDFesPayment slipInpayment slipEinzahlungsscheinESR

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  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)[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)[elibyy/tcpdf-laravel

tcpdf support for Laravel 6, 7, 8, 9, 10, 11

3542.7M5](/packages/elibyy-tcpdf-laravel)[propa/tcpdi

TCPDI is a PHP class for importing PDF to use with TCPDF

231.1M1](/packages/propa-tcpdi)[bithost-gmbh/pdfviewhelpers

This is a TYPO3 CMS extension that provides various Fluid ViewHelpers to generate PDF documents.

45242.7k2](/packages/bithost-gmbh-pdfviewhelpers)[qipsius/tcpdf-bundle

A bundle to easily integrate TCPDF into Symfony

22709.1k](/packages/qipsius-tcpdf-bundle)

PHPackages © 2026

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