ubl/png-print-zplii 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

ubl/png-print-zplii

Composer 安装命令:

composer require ubl/png-print-zplii

包简介

Converts PNGs to ZPL internal graphic format for printing.

README 文档

README

Helper class for printing PNG images using Zebra ZPL II printer language.

Class returns ZPLII commands ~DG for downloading image to printer and ^XG for printing uncompressed PNG image.

In addition there are a few methods to manipulate image before printing and settings on printer like start position of print, rotation of image and memory location on printer.

Any reflections and a small tableau of research on this issue you will find here.

Requirements

  • PHP 7.3+

Installation

To install package in your app or for testing use composer:

composer require ubl/png-print-zplii

# Otherwise add class to your composer dependencies
{
    "require": {
      "ubl/png-print-zplii": "master"
    }
}

Usage

use PrintZplii\PrintZplii;

$print = new PrintZplii();
// setSource - Set file path to image. (Obligatory)
$print->setSource('Filepath to image');
// setRotation - Set degree to rotate image for print (Optional, Default: 0, Range: 0-360)
$print->setRotation(0);
// setPositionX - Set position on x graph for start printing. (Optional, Default: 0, Range > 0)
$print->setPositionX(0);
// setPositionY - Set position on y graph for start printing. (Optional, Default: 0, Range > 0)
$print->setPositionY(0);
// setTarget - Set filename for uploading image. (Optional, Default: UNKNOWN.GRF, Regex [A-Z0-9]{1,8}\\.GRF)
$print->setTarget('UNKNOWN.GRF');
// setMemoryType - Set memory type where image should be stored at printer (Optional,
// Default: R (for FLASH/DRAM), Options: R,E,B,A)
$print->setMemoryType('R');
// Public processing methods:
// getZplDG - Return only ~DG command for downloading image to printer 
$print->getZplDG();
// getPrintCommandZplII - Return complete command of downloading image to printer
// and then processing print with ^XG command.
$print->getPrintCommand();

Development

Class comes without any dependency package at productive stage. For development use `composer install` to install necessary dev packages as for example: PHPUnit and PHP Codesniffer.

// For code sniffer test on coding standard PSR12 run:
composer csphp

// For PHPUnit tests run:
composer phpunit

// To run both tests in one
composer test

Links

Inspired by

General

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2020-12-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固