Skip to content

Latest commit

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Zebra

PHP ZPL builder, image conversion and a basic client for network-connected Zebra label printers.

Requires: PHP 7.1.0+

  • Convert images to ASCII hex.
  • Create ZPL code in PHP that is easy to read.
  • Simple wrapper for PHP sockets to send ZPL to the printer via raw TCP/IP (port 9100).

Example

The following example will print a label with an image positioned 50 dots from the top left.

useZebra\Client;
useZebra\Zpl\Image;
useZebra\Zpl\Builder;
useZebra\Zpl\GdDecoder;
$decoder = GdDecoder::fromPath('example.png');
$image = newImage($decoder);
$zpl = newBuilder();
$zpl->fo(50, 50)->gf($image)->fs();
$client = newClient('10.0.0.50');
$client->send($zpl);

Installation with Composer

$ composer require robgridley/zebra

About

PHP ZPL builder, image conversion and a basic client for network-connected Zebra label printers.

Resources

Stars

226 stars

Watchers

26 watching

Forks

Releases

Packages

Used by

Contributors

Languages