Download the PHP package 8ctopus/pigeon-invoice without Composer
On this page you can find all versions of the php package 8ctopus/pigeon-invoice. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download 8ctopus/pigeon-invoice
More information about 8ctopus/pigeon-invoice
Files in 8ctopus/pigeon-invoice
Package pigeon-invoice
Short Description Create pdf and html invoices
License MIT
Homepage https://github.com/8ctopus/pigeon-invoice
Informations about the package pigeon-invoice
The pigeon invoice
Create pdf invoices
features
- create pdf and html invoices
- fully customizable thanks to
Twig
templates - localizable (demo shows Arabic, French, German, Greek, Japanese, Korean, Russian and Traditional Chinese)
- extendable to include custom data (see the
extend
dir) - choice of pdf engines:
Dompdf
using eitherCPDF
orPDFLib
andwk<html>topdf
- adjust paper size
requirements
php > 8.0
withext-dom
andext-mbstring
installed
demo
- git clone the project
- check generated invoices
invoice.pdf
andinvoice.html
install
-
install package
- copy the
resources
directory to your project
pdf engines
-
Dompdf
includes three enginesCPDF
(bundled with Dompdf)PDFLib
is a commercial library with more advanced rendering thanCPDF
. It takes the form of a php extension that you will need to add to your php configuration.GD
will produce a pdf containing an image
wk<html>topdf
To use the wk<html>topdf
engine, you will need to download the binary for your system and add it to the current working directory getcwd()
or to the system path.
Twig templates reference documentation
https://twig.symfony.com/doc/3.x/
custom fonts
Fonts can either be provided as a style sheet link in the html head, which requires the isRemoteEnabled
permission:
or from the local drive using css, but only in TrueType *.ttf
format:
I would recommend you use the second variant in production.
support more languages
A font supports a limited number of languages, and therefore if you want to support many different languages, you will need to add fonts that have the glyphs for the language characters. Here's an example where the default font is Segoe UI
(latin languages), then it falls back to Meiyro UI
for Japanese, and Malgun Gothic
for Korean:
If the font does not support the language, you will see small squares instead of the correct characters. These are called tofu
because they resemble small blocks of tofu.
More info: https://github.com/dompdf/dompdf/wiki/UnicodeHowTo
credits
- Dompdf https://github.com/dompdf/dompdf
- CPDF https://github.com/PhenX/CPdf (used internally by Dompdf)
- wk\<html>topdf https://wkhtmltopdf.org/
- Twig https://github.com/twigphp/Twig
- logo https://www.canva.com/design
- Tangerine font https://www.fontsquirrel.com/license/Tangerine
tests
composer test
Note: tests do not check the pdf output, it seems it's not ready yet in DomPDF
clean code
composer fix
All versions of pigeon-invoice with dependencies
dompdf/dompdf Version ^3.0
twig/twig Version ^3.0
twig/intl-extra Version ^3.3