GsOneDataBarExpandedStacked

GsOneDataBarExpandedStacked Barcode type class GS1 DataBar Expanded Stacked (ISO/IEC 24724)

Namespace: Com\Tecnick\Barcode\Type\Linear

Extends: GsOneDataBarExpanded

File: GsOneDataBarExpandedStacked.php line 49

GsOneDataBarExpandedStacked Barcode type class GS1 DataBar Expanded Stacked (ISO/IEC 24724)

Multi-row variation of GS1 DataBar Expanded of 2 to 11 rows, each 2 to 20 segments wide and 34 modules high, divided by separator patterns of three module rows. The encoding is identical to GS1 DataBar Expanded; the symbol characters are laid out over the rows in order, every row but the last one carrying the same even number of them.

The second row and the following even rows are mirrored when they hold a number of segments that is a multiple of four, so that they start with a bar. An incomplete last row with an odd number of finder patterns is moved one module to the right, because its guard patterns would otherwise be symmetric.

Tags

Methods

__construct()

File: Type.php line 66

public __construct(string $code[, int $width = -1 ][, int $height = -1 ][, string $color = 'black' ][, array<string|int, int|float|string> $params = [] ][, array{int, int, int, int} $padding = [0, 0, 0, 0] ]) : mixed

Parameters

  • $code : string: Barcode content
  • $width : int = -1: Barcode width in user units (excluding padding). A negative value indicates the multiplication factor for each column.
  • $height : int = -1: Barcode height in user units (excluding padding). A negative value indicates the multiplication factor for each row.
  • $color : string = ‘black’: Foreground color in Web notation (color name, or hexadecimal code, or CSS syntax) or PDF spot color name
  • $params : array<string|int, int|float|string> = []: Array containing extra parameters for the specified barcode type
  • $padding : array{int, int, int, int} = [0, 0, 0, 0]: Additional padding to add around the barcode (top, right, bottom, left) in user units. A negative value indicates the number of rows or columns.

Tags

  • throws: Exception in case of error
  • throws: Exception in case of color error

getArray()

File: Type.php line 258

public getArray() : Rgb, 'bars': array{int, int, int, int}[]}

Return values

Rgb, ‘bars’: array{int, int, int, int}[]}

getBarsArrayXYWH()

File: Type.php line 690

public getBarsArrayXYWH() : array<int, array{float, float, float, float}>

Return values

array<int, array{float, float, float, float}>

getBarsArrayXYXY()

File: Type.php line 651

public getBarsArrayXYXY() : array<int, array{float, float, float, float}>

Return values

array<int, array{float, float, float, float}>

getExtendedCode()

File: Type.php line 284

public getExtendedCode() : string

Return values

string

getGd()

File: Type.php line 603

public getGd() : GdImage

Tags

  • throws: Exception if the GD library is not installed or the image is too large

Return values

GdImage

getGrid()

File: Type.php line 635

public getGrid([string $space_char = '0' ][, string $bar_char = '1' ]) : string

Parameters

  • $space_char : string = ‘0’: Character or string to use for filling empty spaces
  • $bar_char : string = ‘1’: Character or string to use for filling bars

Return values

string

getGridArray()

File: Convert.php line 330

public getGridArray([string $space_char = '0' ][, string $bar_char = '1' ]) : array<int, array<int, string>>

Parameters

  • $space_char : string = ‘0’: Character or string to use for filling empty spaces
  • $bar_char : string = ‘1’: Character or string to use for filling bars

Return values

array<int, array<int, string»

getHtmlDiv()

File: Type.php line 428

public getHtmlDiv() : string

Return values

string —

HTML code (DIV block)

getInlineSvgCode()

File: Type.php line 339

public getInlineSvgCode() : string

Return values

string —

Inline SVG code.

getPng()

File: Type.php line 466

public getPng([string|null $filename = null ]) : void

Parameters

  • $filename : string|null = null: The file name without extension (optional). Only allows alphanumeric characters, underscores and hyphens. Defaults to a md5 hash of the data. The file extension is always ‘.png’.

Tags

  • throws: Exception in case image generation fails

getPngData()

File: Type.php line 480

public getPngData([bool $imagick = true ]) : string

Parameters

  • $imagick : bool = true: If true try to use the Imagick extension

Tags

  • throws: Exception in case image generation fails

Return values

string —

PNG image data

getPngDataImagick()

File: Type.php line 532

public getPngDataImagick() : string

Tags

  • throws: Exception if the Imagick library is not installed or the image is too large

Return values

string

getSvg()

File: Type.php line 329

public getSvg([string|null $filename = null ]) : void

Parameters

  • $filename : string|null = null: The file name without extension (optional). Only allows alphanumeric characters, underscores and hyphens. Defaults to a md5 hash of the data. The file extension is always ‘.svg’.

getSvgCode()

File: Type.php line 418

public getSvgCode() : string

Return values

string —

SVG code

setBackgroundColor()

File: Type.php line 198

public setBackgroundColor(string $color) : static

Parameters

  • $color : string: Background color in Web notation (color name, or hexadecimal code, or CSS syntax) or PDF spot color name

Tags

  • throws: Exception in case of color error

Return values

static

setColor()

File: Type.php line 179

public setColor(string $color) : static

An empty or transparent foreground color is rejected with a BarcodeException.

Parameters

  • $color : string: Foreground color in Web notation (color name, or hexadecimal code, or CSS syntax) or PDF spot color name

Tags

  • throws: Exception in case of color error
  • throws: Exception in case of empty or transparent color

Return values

static

setSize()

File: Type.php line 109

public setSize(int $width, int $height[, array{int, int, int, int} $padding = [0, 0, 0, 0] ]) : static

Parameters

  • $width : int: Barcode width in user units (excluding padding). A negative value indicates the multiplication factor for each column.
  • $height : int: Barcode height in user units (excluding padding). A negative value indicates the multiplication factor for each row.
  • $padding : array{int, int, int, int} = [0, 0, 0, 0]: Additional padding to add around the barcode (top, right, bottom, left) in user units. A negative value indicates the number of rows or columns.

Tags

  • throws: Exception in case of an empty barcode or invalid padding

Return values

static