TCPDF2DBarcode Klassenreferenz

TCPDF2DBarcode Klassenreferenz

Öffentliche Methoden

 __construct ($code, $type)
 
 getBarcodeArray ()
 
 getBarcodeSVG ($w=3, $h=3, $color='black')
 
 getBarcodeSVGcode ($w=3, $h=3, $color='black')
 
 getBarcodeHTML ($w=10, $h=10, $color='black')
 
 getBarcodePNG ($w=3, $h=3, $color=array(0, 0, 0))
 
 setBarcode ($code, $type)
 

Geschützte Attribute

 $barcode_array = false
 

Ausführliche Beschreibung

PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org).

Definiert in Zeile 50 der Datei tcpdf_barcodes_2d.php.

Beschreibung der Konstruktoren und Destruktoren

__construct (   $code,
  $type 
)

This is the class constructor. Return an array representations for 2D barcodes:

  • $arrcode['code'] code to be printed on text label
  • $arrcode['num_rows'] required number of rows
  • $arrcode['num_cols'] required number of columns
  • $arrcode['bcode'][$r][$c] value of the cell is $r row and $c column (0 = transparent, 1 = black)
Parameter
$code(string) code to print
$type(string) type of barcode:
  • DATAMATRIX : Datamatrix (ISO/IEC 16022)
  • PDF417 : PDF417 (ISO/IEC 15438:2006)
  • PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".
  • QRCODE : QRcode Low error correction
  • QRCODE,L : QRcode Low error correction
  • QRCODE,M : QRcode Medium error correction
  • QRCODE,Q : QRcode Better error correction
  • QRCODE,H : QR-CODE Best error correction
  • RAW: raw mode - comma-separad list of array rows
  • RAW2: raw mode - array rows are surrounded by square parenthesis.
  • TEST : Test matrix

Definiert in Zeile 68 der Datei tcpdf_barcodes_2d.php.

Benutzt setBarcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

Dokumentation der Elementfunktionen

getBarcodeArray ( )

Return an array representations of barcode.

Rückgabe
array

Definiert in Zeile 76 der Datei tcpdf_barcodes_2d.php.

Benutzt $barcode_array.

getBarcodeHTML (   $w = 10,
  $h = 10,
  $color = 'black' 
)

Return an HTML representation of barcode.

Parameter
$w(int) Width of a single rectangle element in pixels.
$h(int) Height of a single rectangle element in pixels.
$color(string) Foreground color for bar elements (background is transparent).
Rückgabe
string HTML code.

Definiert in Zeile 144 der Datei tcpdf_barcodes_2d.php.

getBarcodePNG (   $w = 3,
  $h = 3,
  $color = array(0,0,0) 
)

Return a PNG image representation of barcode (requires GD or Imagick library).

Parameter
$w(int) Width of a single rectangle element in pixels.
$h(int) Height of a single rectangle element in pixels.
$color(array) RGB (0-255) foreground color for bar elements (background is transparent).
Rückgabe
image or false in case of error.

Definiert in Zeile 173 der Datei tcpdf_barcodes_2d.php.

getBarcodeSVG (   $w = 3,
  $h = 3,
  $color = 'black' 
)

Send barcode as SVG image object to the standard output.

Parameter
$w(int) Width of a single rectangle element in user units.
$h(int) Height of a single rectangle element in user units.
$color(string) Foreground color (in SVG format) for bar elements (background is transparent).

Definiert in Zeile 87 der Datei tcpdf_barcodes_2d.php.

Benutzt getBarcodeSVGcode().

Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

getBarcodeSVGcode (   $w = 3,
  $h = 3,
  $color = 'black' 
)

Return a SVG string representation of barcode.

Parameter
$w(int) Width of a single rectangle element in user units.
$h(int) Height of a single rectangle element in user units.
$color(string) Foreground color (in SVG format) for bar elements (background is transparent).
Rückgabe
string SVG code.

Definiert in Zeile 108 der Datei tcpdf_barcodes_2d.php.

Wird benutzt von getBarcodeSVG().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

setBarcode (   $code,
  $type 
)

Set the barcode.

Parameter
$code(string) code to print
$type(string) type of barcode:
  • DATAMATRIX : Datamatrix (ISO/IEC 16022)
  • PDF417 : PDF417 (ISO/IEC 15438:2006)
  • PDF417,a,e,t,s,f,o0,o1,o2,o3,o4,o5,o6 : PDF417 with parameters: a = aspect ratio (width/height); e = error correction level (0-8); t = total number of macro segments; s = macro segment index (0-99998); f = file ID; o0 = File Name (text); o1 = Segment Count (numeric); o2 = Time Stamp (numeric); o3 = Sender (text); o4 = Addressee (text); o5 = File Size (numeric); o6 = Checksum (numeric). NOTES: Parameters t, s and f are required for a Macro Control Block, all other parametrs are optional. To use a comma character ',' on text options, replace it with the character 255: "\xff".
  • QRCODE : QRcode Low error correction
  • QRCODE,L : QRcode Low error correction
  • QRCODE,M : QRcode Medium error correction
  • QRCODE,Q : QRcode Better error correction
  • QRCODE,H : QR-CODE Best error correction
  • RAW: raw mode - comma-separad list of array rows
  • RAW2: raw mode - array rows are surrounded by square parenthesis.
  • TEST : Test matrix
Rückgabe
array

Definiert in Zeile 235 der Datei tcpdf_barcodes_2d.php.

Wird benutzt von __construct().

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

Dokumentation der Datenelemente

$barcode_array = false
protected

Array representation of barcode.

Definiert in Zeile 56 der Datei tcpdf_barcodes_2d.php.

Wird benutzt von getBarcodeArray().


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.