PDF417

class

PDF417 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.

package

com.tecnick.tcpdf

author

Nicola Asuni

version 1.0.003

Methods

This is the class constructor.

__construct(string $code,integer $ecl = -1,float $aspectratio = 2,array $macro = array())

Creates a PDF417 object

public

Arguments

$code

string

code to represent using PDF417

$ecl

integer

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

Returns a barcode array which is readable by TCPDF

getBarcodeArray(): array
public

Response

array

barcode array readable by TCPDF;

Compact data by mode.

getCompaction(integer $mode,string $code,boolean $addmode = true): array
protected

Arguments

$mode

integer

compaction mode number

$code

string

data to compact

$addmode

boolean

if true add the mode codeword at first position

Response

array

of codewords

Returns the error correction codewords

getErrorCorrection(array $cw,integer $ecl): array
protected

Arguments

$cw

array

array of codewords including Symbol Length Descriptor and pad

$ecl

integer

error correction level 0-8

Response

array

of error correction codewords

Returns the error correction level (0-8) to be used

getErrorCorrectionLevel(integer $ecl,integer $numcw): integer
protected

Arguments

$ecl

integer

error correction level

$numcw

integer

number of data codewords

Response

integer

error correction level

Create array of sequences from input

getInputSequences(string $code): array
protected

Arguments

$code

string

code

Response

array

bi-dimensional array containing characters and classification

Properties

Barcode array to be returned which is readable by TCPDF.

barcode_array :
protected

Type(s)

Start pattern.

start_pattern :
protected

Type(s)

Stop pattern.

stop_pattern :
protected

Type(s)

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

textsubmodes :
protected

Type(s)

Array of switching codes for Text Compaction Sub-Modes.

textlatch :
protected

Type(s)

Clusters of codewords (0, 3, 6)<br/> Values are hex equivalents of binary representation of bars (1 = bar, 0 = space).<br/> The codewords numbered from 900 to 928 have special meaning, some enable to switch between modes in order to optimise the code:<ul> <li>900 : Switch to "Text" mode</li> <li>901 : Switch to "Byte" mode</li> <li>902 : Switch to "Numeric" mode</li> <li>903 - 912 : Reserved</li> <li>913 : Switch to "Octet" only for the next codeword</li> <li>914 - 920 : Reserved</li> <li>921 : Initialization</li> <li>922 : Terminator codeword for Macro PDF control block</li> <li>923 : Sequence tag to identify the beginning of optional fields in the Macro PDF control block</li> <li>924 : Switch to "Byte" mode (If the total number of byte is multiple of 6)</li> <li>925 : Identifier for a user defined Extended Channel Interpretation (ECI)</li> <li>926 : Identifier for a general purpose ECI format</li> <li>927 : Identifier for an ECI of a character set or code page</li> <li>928 : Macro marker codeword to indicate the beginning of a Macro PDF Control Block</li> </ul>

clusters :
protected

Type(s)

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

rsfactors :
protected

Type(s)