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 or don't want to use it for whatever reason, checkout SwissPaymentSlipTcpdf.
Just install the package (see Installation) and check out the contained examples in the examples folder.
[TODO] If you need help, ask for help.
- PHP 5.4.x+
- SwissPaymentSlip (automatically installed by Composer)
- SwissPaymentSlipPdf (automatically installed by Composer)
Just install composer on your system, if not already there. Then create a composer.json 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.
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 about the class he made for that. On his Github project's page I found Peter Siska's pull request. His pull request introduced PSR-0 compatibility and he created a composer package on Packagist. 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.
- Improve code documentation
- Add more examples/improve existing ones
- Write tests
- Release the stable release of the API
Bugs and feature request are tracked on GitHub.
This project was created by Marc Würth. See Background Story for more details.
SwissPaymentSlipFpdf is licensed under the MIT License. See the LICENSE file for details.
- http://ansuz.sooke.bc.ca/software/ocrb.php for OCRB font
- http://blog.fruit-lab.de/fpdf-font-converter/ for FPDF font converter