PHP code example of wearepixel / zebra-php

1. Go to this page and download the library: Download wearepixel/zebra-php 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/ */

    

wearepixel / zebra-php example snippets


use Wearepixel\ZebraPhp\Client;
use Wearepixel\ZebraPhp\Zpl\Image;
use Wearepixel\ZebraPhp\Zpl\Builder;
use Wearepixel\ZebraPhp\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);

$ composer