cccaimingjian/human-barcode 问题修复 & 功能扩展

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

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

cccaimingjian/human-barcode

最新稳定版本:1.1.0

Composer 安装命令:

composer require cccaimingjian/human-barcode

包简介

Generate more human-readable barcodes. 生成更便于人类阅读的条码

关键字:

README 文档

README

Generate more human-readable barcodes. 生成更便于人类阅读的条码。
THIS PROJECT require picqer/php-barcode-generator

Just BARCODE

just-barcode.png

human-readable BARCODE

with content text and a Line in the middle of the barcode and text content

human-barcode.png

Line Left side Detail

with a short vertical lines

left.png

Line Right side Detail

with a short vertical lines

right.png
The line in the middle of the barcode and text content is used to confirm whether the barcode is correct after printing. If it is broken, or the vertical lines at both ends are not there, it shows that there is a problem with the printer and the barcode may not be recognized correctly.
条码与文字内容中间的线,是用来确认打印后条码是否正确的。如果断了,或者两端的竖线没有,则显示说明打印机有问题,条码不一定能被正确识别。

Here is simple USAGE

$human_barcode = new \cccaimingjian\HumanBarcode\HumanBarcode();
$barcode_image_content = $human_barcode->createHumanBarcode('A-B-C-D-1-2-3456789');
$barcode_image_base64 = base64_encode($barcode_image_content);

Mix Usage

$generator = new Picqer\Barcode\BarcodeGeneratorPNG();
//...
$barcode_text = 'TYPE-CODE-128';
$barcode_image_content_WITHOUT_TEXT =  $generator->getBarcode($barcode_text, $generator::TYPE_CODE_128);
$human_barcode = new \cccaimingjian\HumanBarcode\HumanBarcode();
$human_barcode->setBarcodeData($barcode_image_WITHOUT_TEXT);
$human_barcode->setBarcodeText($barcode_text);
$barcode_image_content = $human_barcode->drawBarcodeText();
$barcode_image_base64 = base64_encode($barcode_image_content);
//Save
file_put_contents('PATH',$barcode_image_content);
<!--blade-->
<img src="data:image/png;base64,{{$barcode_image_base64}}" height="50" alt="">

For ALL USAGE, Please read picqer/php-barcode-generator's document.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-08