interficieis/php-barcode
Composer 安装命令:
composer require interficieis/php-barcode
包简介
Barcode Generation Package inspired by Nicola Asuni.
README 文档
README
This is a barcode generation package inspired by Nicola Asuni. Actually I use that package's underline classes for generating barcode. This package is just a wrapper of that package and adds compatibility with PHP >= 5.4
I used the following classes of that package.
- lib/Barcode1D.php (tcpdf_barcodes_1d.php)
- lib/Barcode2D.php (tcpdf_barcodes_2d.php)
- lib/QRcode.php (include/barcodes/qrcode.php)
- lib/Datamatrix.php (include/barcodes/datamatrix.php)
- lib/PDF417.php (include/barcodes/pdf417.php)
Support
Barcode generator like QRCode, PDF417, Datamatrix, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A,C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code) generator in HTML, PNG and SVG.
This package is compatible with PHP >= 5.4
This package require php-gd extension. So, make sure it is installed on your machine.
Installation
Begin by installing this package through Composer. Just run following command to terminal:
composer require jucksearm/php-barcode
You can also edit your project's composer.json file to require jucksearm/php-barcode.
"require": {
...
"jucksearm/php-barcode": "^1.0"
}
Next, update Composer from the terminal:
composer update
How to Use Basic
use jucksearm\barcode\Barcode; Barcode::html('https://github.com/jucksearm/php-barcode', 'C128');
How to Use Advance
use jucksearm\barcode\Barcode; Barcode::factory() ->setCode('https://github.com/jucksearm/php-barcode') ->setType('C128') ->setScale(null) ->setHeight(null) ->setRotate(null) ->setColor(null) ->renderHTML();
Barcode Option
Barcode::html($code, $type, $scale = null, $height = null, $rotate = null, $color = null) Barcode::png($code, $type, $file= null, $scale = null, $height = null, $rotate = null, $color = null) Barcode::svg($code, $type, $file= null, $scale = null, $height = null, $rotate = null, $color = null)
$type C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, EAN2, EAN5, EAN8, EAN13, UPCA, UPCE, MSI, MSI+, POSTNET, PLANET, RMS4CC, KIX, IMB, CODABAR, CODE11, PHARMA, PHARMA2T $file Barcode save filename [default: `null`] $scale Barcode unit size in `px` units [default: `1`] $height Barcode height in `px` units [default: `30`] $rotate Support 0, 90 in `degrees` units [default: `0`] $color Support in `hexadecimal` color units [default: `000`]
QRcode Option
QRcode::html($code, $emblem = null, $level = null, $size = null, $margin = null, $color = null) QRcode::png($code, $emblem = null, $file = null, $level = null, $size = null, $margin = null, $color = null) QRcode::svg($code, $emblem = null, $file = null, $level = null, $size = null, $margin = null, $color = null)
$emblem Insert mask Logo [default: `null`] $file QRcode save filename [default: `null`] $level QRcode level L,M,Q,H [default: `L`] $size QRcode width and height size in `px` units [default: `100`] $margin QRcode empty space in `percentage` units [default: `1`] $color Support in `hexadecimal` color units [default: `000`]
Datamatrix Option
Datamatrix::html($code, $size = null, $margin = null, $color = null) Datamatrix::png($code, $file = null, $size = null, $margin = null, $color = null) Datamatrix::svg($code, $file = null, $size = null, $margin = null, $color = null)
$file Datamatrix save filename [default: `null`] $size Datamatrix width and height size in `px` units [default: `100`] $margin Datamatrix empty space in `percentage` units [default: `1`] $color Support in `hexadecimal` color units [default: `000`]
PDF417 Option
PDF417::html($code, $size = null, $margin = null, $color = null) PDF417::png($code, $file = null, $size = null, $margin = null, $color = null) PDF417::svg($code, $file = null, $size = null, $margin = null, $color = null)
$file PDF417 save filename [default: `null`] $size PDF417 width and height size in `px` units [default: `100`] $margin PDF417 empty space in `percentage` units [default: `1`] $color Support in `hexadecimal` color units [default: `000`]
License
This package is published under GNU LGPLv3 license and copyright to Jucksearm Boonmor. Original Barcode generation classes were written by Nicola Asuni. The license agreement is on project's root.
License: GNU LGPLv3
- Original Package Nicola Asuni https://github.com/tecnickcom/TCPDF
- Link http://www.tcpdf.org
- Package Copyright Jucksearm Boonmor jucksearm.bkk@gmail.com
interficieis/php-barcode 适用场景与选型建议
interficieis/php-barcode 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 42.25k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 01 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「barcode」 「qr code」 「qrcode」 「datamatrix」 「pdf417」 「CODE 128」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 interficieis/php-barcode 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 interficieis/php-barcode 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 interficieis/php-barcode 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Memio's PrettyPrinter, used to generate PHP code from given Model
Bundle providing a password encoder stack for support of legacy user data.
Based in http://phpqrcode.sourceforge.net/
Symfony 4, 5, 6 ,7 Barcode Generator Bundle with Twig function extension
GS1 parser and generator for PHP
Generates QR Codes
统计信息
- 总下载量: 42.25k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 29
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-only
- 更新时间: 2021-01-20