ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org). More...
Public Member Functions | |
__construct ($code, $type) | |
This is the class constructor. More... | |
getBarcodeArray () | |
Return an array representations of barcode. More... | |
getBarcodeSVG ($w=3, $h=3, $color='black') | |
Send barcode as SVG image object to the standard output. More... | |
getBarcodeSVGcode ($w=3, $h=3, $color='black') | |
Return a SVG string representation of barcode. More... | |
getBarcodeHTML ($w=10, $h=10, $color='black') | |
Return an HTML representation of barcode. More... | |
getBarcodePNG ($w=3, $h=3, $color=array(0, 0, 0)) | |
Send a PNG image representation of barcode (requires GD or Imagick library). More... | |
getBarcodePngData ($w=3, $h=3, $color=array(0, 0, 0)) | |
Return a PNG image representation of barcode (requires GD or Imagick library). More... | |
setBarcode ($code, $type) | |
Set the barcode. More... | |
Protected Attributes | |
$barcode_array = false | |
Array representation of barcode. More... | |
PHP class to creates array representations for 2D barcodes to be used with TCPDF (http://www.tcpdf.org).
Definition at line 50 of file tcpdf_barcodes_2d.php.
TCPDF2DBarcode::__construct | ( | $code, | |
$type | |||
) |
This is the class constructor.
Return an array representations for 2D barcodes:
$code | (string) code to print |
$type | (string) type of barcode:
|
Definition at line 68 of file tcpdf_barcodes_2d.php.
References $code, and setBarcode().
TCPDF2DBarcode::getBarcodeArray | ( | ) |
Return an array representations of barcode.
Definition at line 76 of file tcpdf_barcodes_2d.php.
References $barcode_array.
TCPDF2DBarcode::getBarcodeHTML | ( | $w = 10 , |
|
$h = 10 , |
|||
$color = 'black' |
|||
) |
Return an HTML representation of barcode.
$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). |
Definition at line 144 of file tcpdf_barcodes_2d.php.
References $h, $html, $r, $w, $x, and $y.
TCPDF2DBarcode::getBarcodePNG | ( | $w = 3 , |
|
$h = 3 , |
|||
$color = array(0,0,0) |
|||
) |
Send a PNG image representation of barcode (requires GD or Imagick library).
$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). |
Definition at line 172 of file tcpdf_barcodes_2d.php.
References $data, $h, $w, getBarcodePngData(), and header.
TCPDF2DBarcode::getBarcodePngData | ( | $w = 3 , |
|
$h = 3 , |
|||
$color = array(0,0,0) |
|||
) |
Return a PNG image representation of barcode (requires GD or Imagick library).
$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). |
Definition at line 193 of file tcpdf_barcodes_2d.php.
References $h, $r, $w, $x, and $y.
Referenced by getBarcodePNG().
TCPDF2DBarcode::getBarcodeSVG | ( | $w = 3 , |
|
$h = 3 , |
|||
$color = 'black' |
|||
) |
Send barcode as SVG image object to the standard output.
$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). |
Definition at line 87 of file tcpdf_barcodes_2d.php.
References $code, $h, $w, getBarcodeSVGcode(), and header.
TCPDF2DBarcode::getBarcodeSVGcode | ( | $w = 3 , |
|
$h = 3 , |
|||
$color = 'black' |
|||
) |
Return a SVG string representation of barcode.
$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). |
Definition at line 108 of file tcpdf_barcodes_2d.php.
References $h, $r, $w, $x, $y, and array.
Referenced by getBarcodeSVG().
TCPDF2DBarcode::setBarcode | ( | $code, | |
$type | |||
) |
Set the barcode.
$code | (string) code to print |
$type | (string) type of barcode:
|
Definition at line 252 of file tcpdf_barcodes_2d.php.
References $code, $r, and array.
Referenced by __construct().
|
protected |
Array representation of barcode.
Definition at line 56 of file tcpdf_barcodes_2d.php.
Referenced by getBarcodeArray().