PHP Класс Milon\Barcode\PDF417

Автор: Dinesh Rabara
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$barcode_array Barcode array to be returned which is readable by Dinesh Rabara.
$clusters 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:
  • 900 : Switch to "Text" mode
  • 901 : Switch to "Byte" mode
  • 902 : Switch to "Numeric" mode
  • 903 - 912 : Reserved
  • 913 : Switch to "Octet" only for the next codeword
  • 914 - 920 : Reserved
  • 921 : Initialization
  • 922 : Terminator codeword for Macro PDF control block
  • 923 : Sequence tag to identify the beginning of optional fields in the Macro PDF control block
  • 924 : Switch to "Byte" mode (If the total number of byte is multiple of 6)
  • 925 : Identifier for a user defined Extended Channel Interpretation (ECI)
  • 926 : Identifier for a general purpose ECI format
  • 927 : Identifier for an ECI of a character set or code page
  • 928 : Macro marker codeword to indicate the beginning of a Macro PDF Control Block
$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 Start pattern.
$stop_pattern 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).

Открытые методы

Метод Описание
__construct ( $code, $ecl, $aspectratio = 2, $macro = [] ) This is the class constructor.
getBarcodeArray ( ) : array Returns a barcode array which is readable by Dinesh Rabara

Защищенные методы

Метод Описание
getCompaction ( $mode, $code, $addmode = true ) : array Compact data by mode.
getErrorCorrection ( $cw, $ecl ) : array Returns the error correction codewords
getErrorCorrectionLevel ( $ecl, $numcw ) : integer Returns the error correction level (0-8) to be used
getInputSequences ( $code ) : bidimensional Create array of sequences from input

Описание методов

__construct() публичный Метод

Creates a PDF417 object
public __construct ( $code, $ecl, $aspectratio = 2, $macro = [] )
$code (string) code to represent using PDF417
$ecl (int) error correction level (0-8); default -1 = automatic correction level
$aspectratio (float) the width to height of the symbol (excluding quiet zones)
$macro (array) information for macro block

getBarcodeArray() публичный Метод

Returns a barcode array which is readable by Dinesh Rabara
public getBarcodeArray ( ) : array
Результат array barcode array readable by Dinesh Rabara;

getCompaction() защищенный Метод

Compact data by mode.
protected getCompaction ( $mode, $code, $addmode = true ) : array
$mode (int) compaction mode number
$code (string) data to compact
$addmode (boolean) if true add the mode codeword at first position
Результат array of codewords

getErrorCorrection() защищенный Метод

Returns the error correction codewords
protected getErrorCorrection ( $cw, $ecl ) : array
$cw (array) array of codewords including Symbol Lenght Descriptor and pad
$ecl (int) error correction level 0-8
Результат array of error correction codewords

getErrorCorrectionLevel() защищенный Метод

Returns the error correction level (0-8) to be used
protected getErrorCorrectionLevel ( $ecl, $numcw ) : integer
$ecl (int) error correction level
$numcw (int) number of data codewords
Результат integer error correction level

getInputSequences() защищенный Метод

Create array of sequences from input
protected getInputSequences ( $code ) : bidimensional
$code (string) code
Результат bidimensional array containing characters and classification

Описание свойств

$barcode_array защищенное свойство

Barcode array to be returned which is readable by Dinesh Rabara.
protected $barcode_array

$clusters защищенное свойство

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:
  • 900 : Switch to "Text" mode
  • 901 : Switch to "Byte" mode
  • 902 : Switch to "Numeric" mode
  • 903 - 912 : Reserved
  • 913 : Switch to "Octet" only for the next codeword
  • 914 - 920 : Reserved
  • 921 : Initialization
  • 922 : Terminator codeword for Macro PDF control block
  • 923 : Sequence tag to identify the beginning of optional fields in the Macro PDF control block
  • 924 : Switch to "Byte" mode (If the total number of byte is multiple of 6)
  • 925 : Identifier for a user defined Extended Channel Interpretation (ECI)
  • 926 : Identifier for a general purpose ECI format
  • 927 : Identifier for an ECI of a character set or code page
  • 928 : Macro marker codeword to indicate the beginning of a Macro PDF Control Block
protected $clusters

$rsfactors защищенное свойство

Array of factors of the Reed-Solomon polynomial equations used for error correction; one sub array for each correction level (0-8).
protected $rsfactors

$start_pattern защищенное свойство

Start pattern.
protected $start_pattern

$stop_pattern защищенное свойство

Stop pattern.
protected $stop_pattern

$textlatch защищенное свойство

Array of switching codes for Text Compaction Sub-Modes.
protected $textlatch

$textsubmodes защищенное свойство

Array of text Compaction Sub-Modes (values 0xFB - 0xFF are used for submode changers).
protected $textsubmodes