How robgridley/zebra works
Zebra is a small PHP library for building ZPL labels, converting images for ZPL graphics, and sending ZPL to a networked Zebra printer. In the documented workflow, the caller loads an image through GdDecoder, wraps it as a ZPL image, adds it to a Builder, then sends the generated ZPL through Client. Source confirms the decoder/image and builder/image calls; the README supplies the overall usage flow. The graph omits unverified implementation details of unsampled paths.
Main entry points: Image.php ZPL image · GdDecoder.php GD decoder · Builder.php ZPL builder · Client.php Printer client
Components 7
Image conversion
- GD decoder
src/Zpl/GdDecoder.php - ZPL image
src/Zpl/Image.php
ZPL building
- ZPL builder
src/Zpl/Builder.php
Printer transport
- Printer client
src/Client.php
Other components
- Application
- PHP GD
- Zebra printer
Connections 9
- Application → GD decoder: loads image
- GD decoder → PHP GD: decodes pixels
- Application → ZPL image: wraps decoder
- ZPL image → GD decoder: reads dimensions
- ZPL image → GD decoder: reads pixels
- Application → ZPL builder: adds commands
- ZPL builder → ZPL image: reads image data
- Application → Printer client: sends ZPL
- Printer client → Zebra printer: writes TCP