Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401] [Versions 401 and 402] [Versions 401 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: string $code code to represent using PDF417
param: int $ecl error correction level (0-8); default -1 = automatic correction level
param: float $aspectratio the width to height of the symbol (excluding quiet zones)
param: array $macro 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: int $ecl error correction level
param: int $numcw number of data codewords
return: int error correction level

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

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

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

param: string $code code
return: array bi-dimensional array containing characters and classification

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

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