Download the PHP package andersonls/zpl without Composer
On this page you can find all versions of the php package andersonls/zpl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download andersonls/zpl
More information about andersonls/zpl
Files in andersonls/zpl
Download andersonls/zpl
More information about andersonls/zpl
Files in andersonls/zpl
Vendor andersonls
Package zpl
Short Description This library is a php wrapper for the ZPL Programming Language.
License GPL-3.0-or-later
Homepage https://github.com/andersonls/zpl
Package zpl
Short Description This library is a php wrapper for the ZPL Programming Language.
License GPL-3.0-or-later
Homepage https://github.com/andersonls/zpl
Keywords zplphp-wrapper
Please rate this library. Is it a good library?
Informations about the package zpl
This library is a php wrapper for the ZPL Programming Language.
Installation:
How to use
Below are concise examples showing common (simple) and more advanced usages of the library.
Simple usage (create a label with one cell and print it):
Advanced usage (multiple elements, barcodes, QR codes, graphics, pages and raw commands):
Macros
You can extend the ZplBuilder with custom macros to add reusable commands or behaviors. Macros are registered using the macro() method and can be called as if they were native methods.
Registering a Macro
Using a Macro
Notes
- Macros have access to the builder instance via
$this. - You can override existing methods, but use caution to avoid breaking core functionality.
- Macros are useful for encapsulating label patterns, custom shapes, or repetitive tasks.
Notes and tips
- Units: the constructor accepts a Unit enum (for example:
Unit::MMorUnit::DOTS). When usingUnit::MM, coordinates are converted to printer dots using the configured DPI (default 203). - DPI: default resolution is 203 DPI. Use
setDpi()to change it orgetDpi()to read it. - Font mapping: use
setFontMapper()to provide a mapper implementing\Zpl\Fonts\AbstractMapper(the included\Zpl\Fonts\Genericmaps logical font ids to ZPL fonts). - Special characters: common control characters are converted to their ZPL-safe hex sequences automatically (see library mappings for details).
- Debugging: write the ZPL to a file and inspect it or send it to a printer emulator before printing on physical media.
Donations
If this project helps you somehow, you can give me a cup of coffee :)
All versions of zpl with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.2
The package andersonls/zpl contains the following files
Loading the files please wait ...
