classPDF417

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Public Member Functions

 construct ($code, $ecl=-1, $aspectratio=2, $macro=array())
 
 getBarcodeArray ()
 

Protected Member Functions

 getErrorCorrectionLevel ($ecl, $numcw)
 
 getErrorCorrection ($cw, $ecl)
 
 getInputSequences ($code)
 
 getCompaction ($mode, $code, $addmode=true)
 

Protected Attributes

 $barcode_array = array()
 
 $start_pattern = ‘11111111010101000’
 
 $stop_pattern = ‘111111101000101001’
 
 $textsubmodes
 
 $textlatch
 
 $clusters
 
 $rsfactors
 

Detailed Description

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.

Constructor & Destructor Documentation

PDF417::construct (   $code,
  $ecl = -1,
  $aspectratio = 2,
  $macro = array() 
)

This is the class constructor. Creates a PDF417 object

Parameters
$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

Member Function Documentation

PDF417::getBarcodeArray ( )

Returns a barcode array which is readable by TCPDF

Returns
array barcode array readable by TCPDF;

PDF417::getCompaction (   $mode,
  $code,
  $addmode = true 
)
protected

Compact data by mode.

Parameters
$mode(int) compaction mode number
$code(string) data to compact
$addmode(boolean) if true add the mode codeword at first position
Returns
array of codewords

PDF417::getErrorCorrection (   $cw,
  $ecl 
)
protected

Returns the error correction codewords

Parameters
$cw(array) array of codewords including Symbol Length Descriptor and pad
$ecl(int) error correction level 0-8
Returns
array of error correction codewords

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

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

Parameters
$ecl(int) error correction level
$numcw(int) number of data codewords
Returns
int error correction level

PDF417::getInputSequences (   $code)
protected

Create array of sequences from input

Parameters
$code(string) code
Returns
bidimensional array containing characters and classification

Member Data Documentation

PDF417::$barcode_array = array()
protected

Barcode array to be returned which is readable by TCPDF.

PDF417::$clusters
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:

  • 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

PDF417::$rsfactors
protected

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

PDF417::$start_pattern = ‘11111111010101000’
protected

Start pattern.

PDF417::$stop_pattern = ‘111111101000101001’
protected

Stop pattern.

PDF417::$textlatch
protected
Initial value:
= array(
'01' => array(27), '02' => array(28), '03' => array(28,25),
'10' => array(28,28), '12' => array(28), '13' => array(28,25),
'20' => array(28), '21' => array(27), '23' => array(25),
'30' => array(29), '31' => array(29,27), '32' => array(29,28)
)

Array of switching codes for Text Compaction Sub-Modes.

PDF417::$textsubmodes
protected
Initial value:
= array(
array(0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x20,0xFD,0xFE,0xFF),
array(0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x20,0xFD,0xFE,0xFF),
array(0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x26,0x0d,0x09,0x2c,0x3a,0x23,0x2d,0x2e,0x24,0x2f,0x2b,0x25,0x2a,0x3d,0x5e,0xFB,0x20,0xFD,0xFE,0xFF),
array(0x3b,0x3c,0x3e,0x40,0x5b,0x5c,0x5d,0x5f,0x60,0x7e,0x21,0x0d,0x09,0x2c,0x3a,0x0a,0x2d,0x2e,0x24,0x2f,0x22,0x7c,0x2a,0x28,0x29,0x3f,0x7b,0x7d,0x27,0xFF)
)

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


The documentation for this class was generated from the following file:
  • /home/nick/WWW/_OPENSOURCE/tcpdf/include/barcodes/pdf417.php

 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy