承接 gblix/weez-zpl 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gblix/weez-zpl

最新稳定版本:0.0.9

Composer 安装命令:

composer require gblix/weez-zpl

包简介

Project weez-zpl, forked from teddy-dubal/weez-zpl. This one is focused on its maintenance.

README 文档

README

Inspired by w3blogfr/zebra-zpl

This library will help you to quickly generate ZPL code for your Zebra printer.

Library support only most commons ZPL commons (Text, Code bar 39)

For the moment, library was tested on Zebra 300 dpi with native font zebra-0. I

But you can insert natif zpl at all times.

You can also fork this project and share code if you make this library better.

Getting started

Clone the repository and install dependencies:

$ git clone https://github.com/teddy-dubal/weez-zpl.git
$ cd weez-zpl/docker
$ docker-compose up
$ docker exec -it docker_appzpl_1 bash
$ su application
$ composer install
$ php test.php
$faker      = Factory::create();
$fakerImage = $faker->image(null, 150, 150, 'transport', true);
//Init Label
$zebraLabel = new ZebraLabel(912, 912);
$zebraLabel->setDefaultZebraFont(new ZebraFont(ZebraFont::ZEBRA_ZERO));
//Add Text element
$zebraLabel->addElement(new ZebraText(10, 84, "Product:", 14));
$zebraLabel->addElement(new ZebraText(395, 84, "Camera", 14));

$zebraLabel->addElement(new ZebraGraficBox(10, 100, 800, 5));

$zebraLabel->addElement(new ZebraText(10, 161, "CA201212AA", 14));

//Add Code Bar 39
$zebraLabel->addElement(new ZebraBarCode39(10, 297, "CA201212AA", 118, 2, 2));

$zebraLabel->addElement(new ZebraText(10, 365, "Qté:", 11));
$zebraLabel->addElement(new ZebraText(180, 365, "3", 11));
$zebraLabel->addElement(new ZebraText(317, 365, "QA", 11));

$zebraLabel->addElement(new ZebraText(10, 520, "Ref log:", 11));
$zebraLabel->addElement(new ZebraText(180, 520, "0035", 11));
$zebraLabel->addElement(new ZebraText(10, 596, "Ref client:", 11));
$zebraLabel->addElement(new ZebraText(180, 599, "1234", 11));
//Add Image from Url
$zebraLabel->addElement(new ZebraImage(350, 850, $fakerImage));
//Add Qr Code
$zebraLabel->addElement(new ZebraQrCode(350, 297, 'test'));

echo $zebraLabel->getZplCode();

Native code

If you need to customise your label

$zebraLabel.addElement(new ZebraNativeZpl("^KD0\n"));
/*
You can also use usefull fonction ZplUtils.zplCommand to generate a zpl command (with many variables)
*/
ZplUtils::zplCommand("A", ["0", "R"]); //will return ^A,0,R

Zpl Viewver

http://labelary.com/viewer.html

Written with StackEdit.

统计信息

  • 总下载量: 13.42k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2020-12-14