sqkhor/publication-barcode 问题修复 & 功能扩展

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

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

sqkhor/publication-barcode

最新稳定版本:v1.0.2

Composer 安装命令:

composer require sqkhor/publication-barcode

包简介

For generating ISBN and ISSN barcodes.

README 文档

README

PHP script specifically for generating ISBN and ISSN barcodes.
It could be used to generate other EAN-13 barcodes too, though not designed to do so.

Installation

You could either download everything in src/ into your project, or install via composer:

composer require sqkhor/publication-barcode

Usage

use \SQKhor\Barcode\PublicationBarcode;

// ISBN
$barcode = new PublicationBarcode('978-967-2088-62-2');
$svg = $barcode->render('svg');

// ISBN with add on
$barcode = new PublicationBarcode('978-967-2088-62-2', '50999');
$png = $barcode->render('svg');

// ISSN with issue number
$barcode = new PublicationBarcode('3009-1004', '01');
$svg = $barcode->svg();

Method Parameters

new PublicationBarcode(code, [addon])

code (string)
The 13-digit ISBN / ISSN, or 8-digit ISSN code

addon (?string)
Supplimentary barcode data for price (ISBN) and issue number (ISSN)


render(format)

format (string)
Either one of these: svg | png | jpg | jpeg

Shorthands

$barcode = new PublicationBarcode('978-967-2088-62-2');
$svg = $barcode->svg();
$png = $barcode->png();
$jpg = $barcode->jpg();

Sample

ISBN:

ISSN with issue number:

To-Do

  • PNG / JPG render capability
  • Class parameters to set bar width & height
  • Reset after every use
  • Error handling
  • Comments / documentations
  • Tests

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-09-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固