Property | Type | Description | |
---|---|---|---|
$barcode_array | Array representation of barcode. |
Method | Description | |
---|---|---|
__construct ( $code, $type ) | This is the class constructor. | |
dec_to_hex ( $number ) : string | Convert large integer number to hexadecimal representation. | |
getBarcodeArray ( ) : array | Return an array representations of barcode. | |
getBarcodeHTML ( $w = 2, $h = 30, $color = 'black' ) : string | Return an HTML representation of barcode. | |
getBarcodePNG ( $w = 2, $h = 30, $color = [0, 0, 0] ) : image | Return a PNG image representation of barcode (requires GD or Imagick library). | |
getBarcodeSVG ( $w = 2, $h = 30, $color = 'black' ) | Send barcode as SVG image object to the standard output. | |
getBarcodeSVGcode ( $w = 2, $h = 30, $color = 'black' ) : string | Return a SVG string representation of barcode. | |
hex_to_dec ( $hex ) : string | Convert large hexadecimal number to decimal representation (string). | |
setBarcode ( $code, $type ) : array | Set the barcode. |
Method | Description | |
---|---|---|
barcode_c128 ( $code, $type = '' ) : array | C128 barcodes. | |
barcode_codabar ( $code ) : array | CODABAR barcodes. | |
barcode_code11 ( $code ) : array | CODE11 barcodes. | |
barcode_code39 ( $code, $extended = false, $checksum = false ) : array | CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9. | |
barcode_code93 ( $code ) : array | CODE 93 - USS-93 Compact code similar to Code 39. | |
barcode_eanext ( $code, $len = 5 ) : array | UPC-Based Extentions 2-Digit Ext.: Used to indicate magazines and newspaper issue numbers 5-Digit Ext.: Used to mark suggested retail price of books. | |
barcode_eanupc ( $code, $len = 13 ) : array | EAN13 and UPC-A barcodes. | |
barcode_i25 ( $code, $checksum = false ) : array | Interleaved 2 of 5 barcodes. | |
barcode_imb ( $code ) : array | IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200 (requires PHP bcmath extension) Intelligent Mail barcode is a 65-bar code for use on mail in the United States. | |
barcode_msi ( $code, $checksum = false ) : array | MSI. | |
barcode_pharmacode ( $code ) : array | Pharmacode Contains digits (0 to 9). | |
barcode_pharmacode2t ( $code ) : array | Pharmacode two-track Contains digits (0 to 9). | |
barcode_postnet ( $code, $planet = false ) : array | POSTNET and PLANET barcodes. | |
barcode_rms4cc ( $code, $kix = false ) : array | RMS4CC - CBC - KIX RMS4CC (Royal Mail 4-state Customer Code) - CBC (Customer Bar Code) - KIX (Klant index - Customer index) RM4SCC is the name of the barcode symbology used by the Royal Mail for its Cleanmail service. | |
barcode_s25 ( $code, $checksum = false ) : array | Standard 2 of 5 barcodes. | |
binseq_to_array ( $seq, $bararray ) : array | Convert binary barcode sequence to TCPDF barcode array. | |
checksum_code39 ( $code ) : char | Calculate CODE 39 checksum (modulo 43). | |
checksum_code93 ( $code ) : string | Calculate CODE 93 checksum (modulo 47). | |
checksum_s25 ( $code ) : integer | Checksum for standard 2 of 5 barcodes. | |
encode_code39_ext ( $code ) : encoded | Encode a string to be used for CODE 39 Extended mode. | |
get128ABsequence ( $code ) : array | Split text code in A/B sequence for 128 code. | |
imb_crc11fcs ( $code_arr ) : integer | Intelligent Mail Barcode calculation of Frame Check Sequence. | |
imb_reverse_us ( $num ) : integer | Reverse unsigned short value. | |
imb_tables ( $n, $size ) : array | generate Nof13 tables used for Intelligent Mail Barcode. |
public __construct ( $code, $type ) | ||
$code | (string) code to print | |
$type | (string) type of barcode:
|
protected barcode_c128 ( $code, $type = '' ) : array | ||
$code | (string) code to represent. | |
$type | (string) barcode type: A, B, C or empty for automatic switch (AUTO mode) | |
return | array | barcode representation. |
protected barcode_codabar ( $code ) : array | ||
$code | (string) code to represent. | |
return | array | barcode representation. |
protected barcode_code11 ( $code ) : array | ||
$code | (string) code to represent. | |
return | array | barcode representation. |
protected barcode_code39 ( $code, $extended = false, $checksum = false ) : array | ||
$code | (string) code to represent. | |
$extended | (boolean) if true uses the extended mode. | |
$checksum | (boolean) if true add a checksum to the code. | |
return | array | barcode representation. |
protected barcode_code93 ( $code ) : array | ||
$code | (string) code to represent. | |
return | array | barcode representation. |
protected barcode_eanext ( $code, $len = 5 ) : array | ||
$code | (string) code to represent. | |
$len | (string) barcode type: 2 = 2-Digit, 5 = 5-Digit | |
return | array | barcode representation. |
protected barcode_eanupc ( $code, $len = 13 ) : array | ||
$code | (string) code to represent. | |
$len | (string) barcode type: 6 = UPC-E, 8 = EAN8, 13 = EAN13, 12 = UPC-A | |
return | array | barcode representation. |
protected barcode_i25 ( $code, $checksum = false ) : array | ||
$code | (string) code to represent. | |
$checksum | (boolean) if true add a checksum to the code | |
return | array | barcode representation. |
protected barcode_imb ( $code ) : array | ||
$code | (string) code to print, separate the ZIP (routing code) from the rest using a minus char '-' (BarcodeID_ServiceTypeID_MailerID_SerialNumber-RoutingCode) | |
return | array | barcode representation. |
protected barcode_msi ( $code, $checksum = false ) : array | ||
$code | (string) code to represent. | |
$checksum | (boolean) if true add a checksum to the code (modulo 11) | |
return | array | barcode representation. |
protected barcode_pharmacode ( $code ) : array | ||
$code | (string) code to represent. | |
return | array | barcode representation. |
protected barcode_pharmacode2t ( $code ) : array | ||
$code | (string) code to represent. | |
return | array | barcode representation. |
protected barcode_postnet ( $code, $planet = false ) : array | ||
$code | (string) zip code to represent. Must be a string containing a zip code of the form DDDDD or DDDDD-DDDD. | |
$planet | (boolean) if true print the PLANET barcode, otherwise print POSTNET | |
return | array | barcode representation. |
protected barcode_rms4cc ( $code, $kix = false ) : array | ||
$code | (string) code to print | |
$kix | (boolean) if true prints the KIX variation (doesn't use the start and end symbols, and the checksum) - in this case the house number must be sufficed with an X and placed at the end of the code. | |
return | array | barcode representation. |
protected barcode_s25 ( $code, $checksum = false ) : array | ||
$code | (string) code to represent. | |
$checksum | (boolean) if true add a checksum to the code | |
return | array | barcode representation. |
protected binseq_to_array ( $seq, $bararray ) : array | ||
$seq | (string) barcode as binary sequence. | |
$bararray | (array) barcode array. òparam array $bararray TCPDF barcode array to fill up | |
return | array | barcode representation. |
protected checksum_code39 ( $code ) : char | ||
$code | (string) code to represent. | |
return | char | checksum. |
protected checksum_code93 ( $code ) : string | ||
$code | (string) code to represent. | |
return | string | checksum code. |
protected checksum_s25 ( $code ) : integer | ||
$code | (string) code to process. | |
return | integer | checksum. |
public dec_to_hex ( $number ) : string | ||
$number | (string) number to convert specified as a string | |
return | string | hexadecimal representation |
protected encode_code39_ext ( $code ) : encoded | ||
$code | (string) code to represent. | |
return | encoded | string. |
protected get128ABsequence ( $code ) : array | ||
$code | (string) code to split. | |
return | array | sequence |
public getBarcodeArray ( ) : array | ||
return | array |
public getBarcodeHTML ( $w = 2, $h = 30, $color = 'black' ) : string | ||
$w | (int) Width of a single bar element in pixels. | |
$h | (int) Height of a single bar element in pixels. | |
$color | (string) Foreground color for bar elements (background is transparent). | |
return | string | HTML code. |
public getBarcodePNG ( $w = 2, $h = 30, $color = [0, 0, 0] ) : image | ||
$w | (int) Width of a single bar element in pixels. | |
$h | (int) Height of a single bar element in pixels. | |
$color | (array) RGB (0-255) foreground color for bar elements (background is transparent). | |
return | image | or false in case of error. |
public getBarcodeSVG ( $w = 2, $h = 30, $color = 'black' ) | ||
$w | (int) Minimum width of a single bar in user units. | |
$h | (int) Height of barcode in user units. | |
$color | (string) Foreground color (in SVG format) for bar elements (background is transparent). |
public getBarcodeSVGcode ( $w = 2, $h = 30, $color = 'black' ) : string | ||
$w | (int) Minimum width of a single bar in user units. | |
$h | (int) Height of barcode in user units. | |
$color | (string) Foreground color (in SVG format) for bar elements (background is transparent). | |
return | string | SVG code. |
public hex_to_dec ( $hex ) : string | ||
$hex | (string) hexadecimal number to convert specified as a string | |
return | string | hexadecimal representation |
protected imb_crc11fcs ( $code_arr ) : integer | ||
$code_arr | (string) array of hexadecimal values (13 bytes holding 102 bits right justified). | |
return | integer | 11 bit Frame Check Sequence as integer (decimal base) |
protected imb_reverse_us ( $num ) : integer | ||
$num | (int) value to reversr | |
return | integer | reversed value |
protected imb_tables ( $n, $size ) : array | ||
$n | (int) is the type of table: 2 for 2of13 table, 5 for 5of13table | |
$size | (int) size of table (78 for n=2 and 1287 for n=5) | |
return | array | requested table |
public setBarcode ( $code, $type ) : array | ||
$code | (string) code to print | |
$type | (string) type of barcode:
|
|
return | array | barcode array |