TCPDF2DBarcode
class TCPDF2DBarcode (View source)
Properties
protected | $barcode_array | Array representation of barcode. |
Methods
This is the class constructor.
Return an array representations of barcode.
Send barcode as SVG image object to the standard output.
Return a SVG string representation of barcode.
Return an HTML representation of barcode.
Send a PNG image representation of barcode (requires GD or Imagick library).
Return a PNG image representation of barcode (requires GD or Imagick library).
Set the barcode.
Details
__construct(string $code, string $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)
array
getBarcodeArray()
Return an array representations of barcode.
getBarcodeSVG(int $w = 3, int $h = 3, string $color = 'black')
Send barcode as SVG image object to the standard output.
string
getBarcodeSVGcode(int $w = 3, int $h = 3, string $color = 'black')
Return a SVG string representation of barcode.
string
getBarcodeHTML(int $w = 10, int $h = 10, string $color = 'black')
Return an HTML representation of barcode.
getBarcodePNG(int $w = 3, int $h = 3, array $color = array(0, 0, 0))
Send a PNG image representation of barcode (requires GD or Imagick library).
string|Imagick|false
getBarcodePngData(int $w = 3, int $h = 3, array $color = array(0, 0, 0))
Return a PNG image representation of barcode (requires GD or Imagick library).
void
setBarcode(string $code, string $type)
Set the barcode.