Installation
Install Barcode with Composer.
shell
composer require raxos/barcodeRequirements
- PHP 8.5 or newer.
- The
ctypeextension (ext-ctype), used by the PDF417 encoder to detect numeric data. - The
gdextension (ext-gd), required to render barcodes to PNG. SVG rendering does not need it. - chillerlan/php-qrcode, the QR encoding library used internally.
- jetbrains/phpstorm-attributes for editor metadata.
Raxos dependencies
- raxos/contract: defines the
BarcodeInterface,EncoderInterfaceandRendererInterfacecontracts that the classes implement. - raxos/error: provides the base exception classes.
- raxos/foundation: provides the
ColorUtilhelper that converts hex colors to RGB during rendering.
No further configuration is needed. The classes are used directly.
Return to the Barcode introduction.