Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
|
Class to create PDF417 barcode arrays for TCPDF class. More...
Public Member Functions | |
__construct ($code, $ecl=-1, $aspectratio=2, $macro=array()) | |
This is the class constructor. | |
getBarcodeArray () | |
Returns a barcode array which is readable by TCPDF. | |
Protected Member Functions | |
getCompaction ($mode, $code, $addmode=true) | |
Compact data by mode. | |
getErrorCorrection ($cw, $ecl) | |
Returns the error correction codewords. | |
getErrorCorrectionLevel ($ecl, $numcw) | |
Returns the error correction level (0-8) to be used. | |
getInputSequences ($code) | |
Create array of sequences from input. | |
Protected Attributes | |
$barcode_array = array() | |
Barcode array to be returned which is readable by TCPDF. | |
$clusters | |
Clusters of codewords (0, 3, 6) Values are hex equivalents of binary representation of bars (1 = bar, 0 = space). | |
$rsfactors | |
Array of factors of the Reed-Solomon polynomial equations used for error correction; one sub array for each correction level (0-8). | |
$start_pattern = '11111111010101000' | |
Start pattern. | |
$stop_pattern = '111111101000101001' | |
Stop pattern. | |
$textlatch | |
Array of switching codes for Text Compaction Sub-Modes. | |
$textsubmodes | |
Array of text Compaction Sub-Modes (values 0xFB - 0xFF are used for submode changers). | |
Class to create PDF417 barcode arrays for TCPDF class.
PDF417 (ISO/IEC 15438:2006) is a 2-dimensional stacked bar code created by Symbol Technologies in 1991. ..
PDF417::__construct | ( | $code, | |
$ecl = -1, | |||
$aspectratio = 2, | |||
$macro = array() ) |
PDF417::getBarcodeArray | ( | ) |
Returns a barcode array which is readable by TCPDF.
array | barcode array readable by TCPDF; |
|
protected |
Compact data by mode.
int | $mode | compaction mode number |
string | $code | data to compact |
boolean | $addmode | if true add the mode codeword at first position |
array | of codewords |
|
protected |
Returns the error correction codewords.
array | $cw | array of codewords including Symbol Length Descriptor and pad |
int | $ecl | error correction level 0-8 |
array | of error correction codewords |
|
protected |
Returns the error correction level (0-8) to be used.
int | $ecl | error correction level |
int | $numcw | number of data codewords |
int | error correction level |
|
protected |
Create array of sequences from input.
string | $code | code |
array | bi-dimensional array containing characters and classification |
|
protected |
Clusters of codewords (0, 3, 6)
Values are hex equivalents of binary representation of bars (1 = bar, 0 = space).
The codewords numbered from 900 to 928 have special meaning, some enable to switch between modes in order to optimise the code:
|
protected |
Array of switching codes for Text Compaction Sub-Modes.
|
protected |
Array of text Compaction Sub-Modes (values 0xFB - 0xFF are used for submode changers).