PHPackages                             survos/zebra-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. survos/zebra-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

survos/zebra-bundle
===================

Symfony bundle for Zebra ZPL preview and printing workflows

2.7.2(1w ago)081MITPHPPHP ^8.4

Since Apr 27Pushed 2d agoCompare

[ Source](https://github.com/survos/zebra-bundle)[ Packagist](https://packagist.org/packages/survos/zebra-bundle)[ GitHub Sponsors](https://github.com/kbond)[ RSS](/packages/survos-zebra-bundle/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (20)Versions (43)Used By (0)

Survos Zebra Bundle
===================

[](#survos-zebra-bundle)

Symfony bundle for Zebra ZPL preview and printing workflows.

Status
------

[](#status)

This bundle is small and focused: it previews Zebra ZPL through Labelary and sends print jobs through common server-side transports.

Current features:

- `SurvosZebraBundle` using `AbstractBundle`
- 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
-------------

[](#configuration)

```
survos_zebra:
  labelary:
    endpoint: 'https://api.labelary.com/v1'
    api_key: null
    timeout: 10
  cache:
    enabled: true
    pool: cache.app
    ttl: 86400
  defaults:
    label_size: gk420d_2_25x1_25
    dpmm: 8
    width_inches: 4.0
    height_inches: 2.0
    format: png
  label_sizes:
    gk420d_2_25x1_25:
      width_inches: 2.25
      height_inches: 1.25
      dpmm: 8
      description: 'Zebra GK420d 2.25 x 1.25 inch label'
  printers:
    zebra:
      type: cups
      queue: zebra
      dpi: 203
      label_width_in: 2.25
      label_height_in: 1.25
    spool:
      type: file
      path: '%kernel.project_dir%/var/zpl'
      dpi: 203
      label_width_in: 2.25
      label_height_in: 1.25
  default_printer: zebra
```

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](docs/gk420d-reliable-printing.md).

The print service automatically prepends the ZPL interpreter guard:

```
^XA^SZ2^XZ

```

It also wraps each label with the configured media dimensions:

```
^XA
^PW457
^LL254
...label body...
^XZ

```

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:

```
dots = inches * dpi

```

Common 203 dpi sizes:

Label size`^PW``^LL`2.25 x 1.25 in4572542.25 x 1 in4572034 x 6 in81212184 x 2 in8124063 x 1 in609203`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
----------

[](#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
------------

[](#verification)

This repository includes a dependency-light smoke test for the bundle primitives:

```
php smoke-test.php
composer validate --strict
```

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance99

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Recently: every ~6 days

Total

42

Last Release

11d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21b39551f92ed4143772c622f9e571589c5a72c96ab3c53fe67489ce0d83e806?d=identicon)[tacman1123](/maintainers/tacman1123)

---

Top Contributors

[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (8 commits)")

---

Tags

symfonyzebrazpllabelarythermal-printertwig-component

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/survos-zebra-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/survos-zebra-bundle/health.svg)](https://phpackages.com/packages/survos-zebra-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M370](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M195](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M506](/packages/shopware-core)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51090.8k2](/packages/web-auth-webauthn-framework)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
