dev-master
9999999-devGenerate a barcode
MIT
The Requires
- ext-gd 0.0.0.*
The Development Requires
by Riddles
by Magnus Flor
by David Tufts
Wallogit.com
2017 © Pedro Peláez
Generate a barcode
Forked from davidscotttufts/php-barcode and MFlor/php-barcode https://github.com/MFlor/php-barcode, (*1)
Class for generating barcodes in four barcode formats including Code 128, Code 39, Code 2of5 and Codabar, (*2)
$text The text to be encoded, (*3)
$code_type Either "code25", "code39", "code128" or "codabar" (See class constants, default "code128"), (*4)
$scale Up- or downscale the image (2 makes the image twice as big, default 1), (*5)
$show_text Show the encoded text below the image (default false), (*6)
$returntype Either "src", "base64" or "gd" (See class constants, default "src"), (*7)
$size The height of the barcode (default 20), (*8)
$orientation The orientation of the barcode (defaut "horizontal"), (*9)
src returns a base64 png encoded string, ready to be inserted into an image tags src attribute, eg:, (*10)
<img src="<?php echo $returned_content; ?>" />
base64 returns the png image as a base64 encoded string, (*11)
gd returns the PHP image resource., (*12)
Generate a barcode
MIT