Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

(no description)

Author: Nicola Asuni
Version: 1.0.005
File Size: 996 lines (54 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PDF417:: (6 methods):
  __construct()
  getBarcodeArray()
  getErrorCorrectionLevel()
  getErrorCorrection()
  getInputSequences()
  getCompaction()


Class: PDF417  - X-Ref


__construct($code, $ecl=-1, $aspectratio=2, $macro=array()   X-Ref
This is the class constructor.
Creates a PDF417 object

param: $code (string) code to represent using PDF417
param: $ecl (int) error correction level (0-8); default -1 = automatic correction level
param: $aspectratio (float) the width to height of the symbol (excluding quiet zones)
param: $macro (array) information for macro block

getBarcodeArray()   X-Ref
Returns a barcode array which is readable by TCPDF

return: array barcode array readable by TCPDF;

getErrorCorrectionLevel($ecl, $numcw)   X-Ref
Returns the error correction level (0-8) to be used

param: $ecl (int) error correction level
param: $numcw (int) number of data codewords
return: int error correction level

getErrorCorrection($cw, $ecl)   X-Ref
Returns the error correction codewords

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

getInputSequences($code)   X-Ref
Create array of sequences from input

param: $code (string) code
return: bidimensional array containing characters and classification

getCompaction($mode, $code, $addmode=true)   X-Ref
Compact data by mode.

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