adamgaskins/barcoder

A classy package to generate SVG barcodes for the web.

Fund package maintenance!
adamgaskins

v0.1.0 2021-01-06 03:14 UTC

This package is auto-updated.

Last update: 2024-04-18 11:58:21 UTC


README

logo.svg

A classy package to generate SVG barcodes for the web.

68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6164616d6761736b696e732f626172636f6465722e7376673f7374796c653d666c61742d737175617265 68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6164616d6761736b696e732f626172636f6465722f54657374733f6c6f676f3d476974687562267374796c653d666c61742d737175617265266c6162656c3d7465737473

demo.gif

Installation

You can install the package via composer:

composer require adamgaskins/barcoder

Usage

See below for a full list of supported barcode types.

QR Code

Barcoder::qrcode('data to encode')->toSvg();

Datamatrix

Barcoder::datamatrix('data to encode')->toSvg();

Code 128

Barcoder::code128('data to encode')->toSvg();

Barcoder::code128('data to encode')->hideLabel()->toSvg();

EAN-8

Barcoder::ean8('12345678')->toSvg();

Barcoder::ean8('12345678')->hideLabel()->toSvg();

EAN-13

Barcoder::ean8('1234567890123')->toSvg();

Barcoder::ean8('1234567890123')->hideLabel()->toSvg();

UPC-A

Barcoder::upca('123456789012')->toSvg();

Barcoder::upca('123456789012')->hideLabel()->toSvg();

UPC-E

Barcoder::upce('123456')->toSvg();

Barcoder::upce('123456')->hideLabel()->toSvg();

Testing

composer test

License

The MIT License (MIT). Please see License File for more information.