Download the PHP package survos/zebra-bundle without Composer
On this page you can find all versions of the php package survos/zebra-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download survos/zebra-bundle
More information about survos/zebra-bundle
Files in survos/zebra-bundle
Package zebra-bundle
Short Description Symfony bundle for Zebra ZPL preview and printing workflows
License MIT
Informations about the package zebra-bundle
Survos Zebra Bundle
Symfony bundle for Zebra ZPL preview and printing workflows.
Status
This bundle is small and focused: it previews Zebra ZPL through Labelary and sends print jobs through common server-side transports.
Current features:
SurvosZebraBundleusingAbstractBundle- In-bundle service registration without
services.php - Labelary-backed preview client and cache wrapper
- Twig extension with
zpl_preview()support - Optional Twig component for label preview
- TCP, CUPS, file, USB, and null print transports
BrowserPrint/client-side USB support is intentionally not part of the current server-side bundle surface.
Configuration
For USB-attached GK420d printers on Linux, prefer a CUPS queue that uses the CUPS USB
backend, for example usb://Zebra/..., then print with type: cups. Avoid writing
directly to /dev/usb/lp*; that path depends on usblp and can leave transport and
interpreter failures hard to distinguish. See docs/gk420d-reliable-printing.md.
The print service automatically prepends the ZPL interpreter guard:
It also wraps each label with the configured media dimensions:
Do not rely on printer-stored defaults for print width or label length. A GK420d
defaults to a 4 inch print width, so narrower stock can produce blank or partial
labels when content lands outside the physical media. Configure each printer
profile with dpi, label_width_in, and label_height_in; the bundle converts
inches to dots with:
Common 203 dpi sizes:
| Label size | ^PW |
^LL |
|---|---|---|
| 2.25 x 1.25 in | 457 | 254 |
| 2.25 x 1 in | 457 | 203 |
| 4 x 6 in | 812 | 1218 |
| 4 x 2 in | 812 | 406 |
| 3 x 1 in | 609 | 203 |
PrinterServiceInterface::testLabel() prints a small known-good label using the
configured dimensions. calibrate() sends ^XA^JC^XZ for new media. saveSettings()
persists ^PW and ^LL with ^JUS, but should be treated as an advanced
single-printer setup command; normal jobs remain explicit per print.
Twig Usage
Named label sizes are also supported:
If symfony/ux-twig-component is installed, the bundle also registers:
You can override the configured default size per component render:
Verification
This repository includes a dependency-light smoke test for the bundle primitives:
All versions of zebra-bundle with dependencies
psr/cache Version ^3.0
psr/log Version ^3.0
symfony/cache Version ^7.4||^8.0
symfony/config Version ^7.4||^8.0
symfony/dependency-injection Version ^7.4||^8.0
symfony/framework-bundle Version ^7.4||^8.0
symfony/http-client Version ^7.4||^8.0
symfony/http-kernel Version ^7.4||^8.0
symfony/twig-bundle Version ^7.4||^8.0