PHP code example of robgridley / zebra

1. Go to this page and download the library: Download robgridley/zebra library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

robgridley / zebra example snippets


use Zebra\Client;
use Zebra\Zpl\Image;
use Zebra\Zpl\Builder;
use Zebra\Zpl\GdDecoder;

$decoder = GdDecoder::fromPath('example.png');
$image = new Image($decoder);

$zpl = new Builder();
$zpl->fo(50, 50)->gf($image)->fs();

$client = new Client('10.0.0.50');
$client->send($zpl);