Download the PHP package atelier/barcode without Composer

On this page you can find all versions of the php package atelier/barcode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package barcode

QR codes, matrix codes, and barcodes as SVG, in pure PHP.

PHP Version Version Tests PHPUnit PHPStan License

Fifteen symbologies, from QR Code and Data Matrix to EAN, UPC, ISBN, GS1, Code 39, Code 93, Code 128, ITF and Codabar. Each one is a fluent builder whose render() returns a string of SVG markup.

     

No required extensions, no image library, no runtime dependencies. The output drops into an <img>, a background-image, an inline <svg>, a PDF, or an email. Every symbology is verified module by module by an extensive test suite.

PNG and GIF · Documentation

Installation

Requires PHP 8.3 or later. ext-gd is needed only for PNG output.

Quick start

A linear barcode is the same shape of call:

Every builder is created with ::create(), configured by chaining, and finished with render(). See Getting started.

Every symbology

Symbology Preview Kind Input
QR Code 2D matrix numeric, alphanumeric, or byte data
Data Matrix 2D matrix extended ASCII, up to 44 chars
GS1 DataMatrix 2D matrix GS1 AI pairs, single-region
EAN-13 1D linear 12-13 digits
EAN-8 1D linear 7-8 digits
UPC-A 1D linear 11-12 digits
UPC-E 1D linear 6-8 digits, number system 0 or 1
ISBN 1D linear ISBN-10 or ISBN-13
Code 128 1D linear 7-bit ASCII
Code 39 1D linear A-Z 0-9 space - . $ / + %
Code 93 1D linear A-Z 0-9 space - . $ / + %
GS1-128 1D linear GS1 AI pairs
ITF-14 1D linear 13-14 digits
Interleaved 2 of 5 1D linear even-length digits
Codabar 1D linear digits, - $ : / . +, guards A-D

Each page carries that symbology's options, defaults, bounds, and the exceptions it throws.

Styling and size

Every builder shares margin(), foreground(), background(), and a size call: size() for matrix codes, scale() and height() for linear ones.

Symbology-specific settings sit alongside them: error correction for QR, a Mod 43 checksum for Code 39, bearer bars for ITF-14, explicit guards for Codabar. See Options.

PNG and GIF

SVG is the default output. When a bitmap is what the consumer needs, a raster renderer takes the same geometry the builder already computed.

PngRenderer requires ext-gd. GifRenderer has the same signature and needs nothing at all, assembling the file byte by byte in PHP. See Renderers.

Raw geometry

A builder can return its geometry instead of markup, for composing into a larger document or rendering with something else entirely. QrCode and DataMatrix expose matrix(), linear symbologies expose modules().

Error handling

Every exception implements Atelier\Barcode\Exception\CodeExceptionInterface, so one catch covers the package.

The concrete types are InvalidCodeException, InvalidColorException, and MissingExtensionException.

Documentation

The full documentation is published at ateliersvg.com/barcode.

Contributing

Contributions are welcome. Visit the project on GitHub to report a bug, suggest a feature, or open a pull request.

Before submitting code, run:

Changes to public behaviour need a test and a documentation update.

Support

Bug reports, security disclosures, and contribution guidelines are collected at ateliersvg.com/support.

Sharing the package or starring it on GitHub helps more than you would think.

License

Atelier Barcode is released under the MIT License.


All versions of barcode with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package atelier/barcode contains the following files

Loading the files please wait ...