PHP 클래스 Milon\Barcode\PDF417

저자: Dinesh Rabara
파일 보기 프로젝트 열기: milon/barcode 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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