Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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

(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