Barcode
in package
Com\Tecnick\Barcode\Barcode
Barcode Barcode class
Tags
Table of Contents
Constants
- BARCODETYPES = ['C128' => 'CODE 128', 'C128A' => 'CODE 128 A', 'C128B' => 'CODE 128 B', 'C128C' => 'CODE 128 C', 'C39' => 'CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9.', 'C39+' => 'CODE 39 + CHECKSUM', 'C39E' => 'CODE 39 EXTENDED', 'C39E+' => 'CODE 39 EXTENDED + CHECKSUM', 'C93' => 'CODE 93 - USS-93', 'CODABAR' => 'CODABAR', 'CODE11' => 'CODE 11', 'EAN13' => 'EAN 13', 'EAN2' => 'EAN 2-Digits UPC-Based Extension', 'EAN5' => 'EAN 5-Digits UPC-Based Extension', 'EAN8' => 'EAN 8', 'I25' => 'Interleaved 2 of 5', 'I25+' => 'Interleaved 2 of 5 + CHECKSUM', 'IMB' => 'IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200', 'IMBPRE' => 'IMB - Intelligent Mail Barcode pre-processed', 'KIX' => 'KIX (Klant index - Customer index)', 'LRAW' => '1D RAW MODE (comma-separated rows of 01 strings)', 'MSI' => 'MSI (Variation of Plessey code)', 'MSI+' => 'MSI + CHECKSUM (modulo 11)', 'PHARMA' => 'PHARMACODE', 'PHARMA2T' => 'PHARMACODE TWO-TRACKS', 'PLANET' => 'PLANET', 'POSTNET' => 'POSTNET', 'RMS4CC' => 'RMS4CC (Royal Mail 4-state Customer Bar Code)', 'S25' => 'Standard 2 of 5', 'S25+' => 'Standard 2 of 5 + CHECKSUM', 'UPCA' => 'UPC-A', 'UPCE' => 'UPC-E', 'AZTEC' => 'AZTEC Code (ISO/IEC 24778:2008)', 'DATAMATRIX' => 'DATAMATRIX (ISO/IEC 16022)', 'PDF417' => 'PDF417 (ISO/IEC 15438:2006)', 'QRCODE' => 'QR-CODE', 'SRAW' => '2D RAW MODE (comma-separated rows of 01 strings)']
- List of supported Barcode Types with description.
Methods
- getBarcodeObj() : Model
- Get the barcode object
Constants
BARCODETYPES
List of supported Barcode Types with description.
public array<string, string>
BARCODETYPES =
['C128' =>
'CODE 128', 'C128A' => 'CODE 128 A', 'C128B' => 'CODE 128 B',
'C128C' => 'CODE 128 C', 'C39' => 'CODE 39 - ANSI
MH10.8M-1983 - USD-3 - 3 of 9.', 'C39+' => 'CODE 39 + CHECKSUM',
'C39E' => 'CODE 39 EXTENDED', 'C39E+' => 'CODE 39 EXTENDED +
CHECKSUM', 'C93' => 'CODE 93 - USS-93', 'CODABAR' =>
'CODABAR', 'CODE11' => 'CODE 11', 'EAN13' => 'EAN 13', 'EAN2'
=> 'EAN 2-Digits UPC-Based Extension', 'EAN5' => 'EAN
5-Digits UPC-Based Extension', 'EAN8' => 'EAN 8', 'I25' =>
'Interleaved 2 of 5', 'I25+' => 'Interleaved 2 of 5 + CHECKSUM',
'IMB' => 'IMB - Intelligent Mail Barcode - Onecode -
USPS-B-3200', 'IMBPRE' => 'IMB - Intelligent Mail Barcode
pre-processed', 'KIX' => 'KIX (Klant index - Customer index)',
'LRAW' => '1D RAW MODE (comma-separated rows of 01 strings)',
'MSI' => 'MSI (Variation of Plessey code)', 'MSI+' => 'MSI +
CHECKSUM (modulo 11)', 'PHARMA' => 'PHARMACODE', 'PHARMA2T'
=> 'PHARMACODE TWO-TRACKS', 'PLANET' => 'PLANET', 'POSTNET'
=> 'POSTNET', 'RMS4CC' => 'RMS4CC (Royal Mail 4-state
Customer Bar Code)', 'S25' => 'Standard 2 of 5', 'S25+' =>
'Standard 2 of 5 + CHECKSUM', 'UPCA' => 'UPC-A', 'UPCE' =>
'UPC-E', 'AZTEC' => 'AZTEC Code (ISO/IEC 24778:2008)',
'DATAMATRIX' => 'DATAMATRIX (ISO/IEC 16022)', 'PDF417' =>
'PDF417 (ISO/IEC 15438:2006)', 'QRCODE' => 'QR-CODE', 'SRAW'
=> '2D RAW MODE (comma-separated rows of 01
strings)']
Methods
getBarcodeObj()
Get the barcode object
public getBarcodeObj(string $type,
string $code[,
int $width
= -1
][,
int $height
= -1
][,
string $color
= 'black'
][,
array{: int, :
int, : int, : int} $padding
= [0, 0, 0,
0] ]) :
Model
Parameters
- $type : string
-
Barcode type
- $code : string
-
Barcode content
- $width : int = -1
-
Barcode width in user units (excluding padding). A negative value indicates the multiplication factor for each column.
- $height : int = -1
-
Barcode height in user units (excluding padding). A negative value indicates the multiplication factor for each row.
- $color : string = 'black'
-
Foreground color in Web notation (color name, or hexadecimal code, or CSS syntax)
- $padding : array{: int, : int, : int, : int} = [0, 0, 0, 0]
-
Additional padding to add around the barcode (top, right, bottom, left) in user units. A negative value indicates the multiplication factor for each row or column.