classes-Com-Tecnick-Barcode-Type-Linear-Imb

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Imb extends Linear

in package

Com\Tecnick\Barcode\Type\Linear\Imb;

Imb Barcode type class IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200

Intelligent Mail barcode is a 65-bar code for use on mail in the United States. The fields are described as follows:

  • The Barcode Identifier shall be assigned by USPS to encode the presort identification that is currently printed in human readable form on the optional endorsement line (OEL) as well as for future USPS use. This shall be two digits, with the second digit in the range of 0–4. The allowable encoding ranges shall be 00–04, 10–14, 20–24, 30–34, 40–44, 50–54, 60–64, 70–74, 80–84, and 90–94.
  • The Service Type Identifier shall be assigned by USPS for any combination of services requested on the mailpiece. The allowable encoding range shall be 000http://it2.php.net/manual/en/function.dechex.php–999. Each 3-digit value shall correspond to a particular mail class with a particular combination of service(s). Each service program, such as OneCode Confirm and OneCode ACS, shall provide the list of Service Type Identifier values.
  • The Mailer or Customer Identifier shall be assigned by USPS as a unique, 6 or 9 digit number that identifies a business entity. The allowable encoding range for the 6 digit Mailer ID shall be 000000- 899999, while the allowable encoding range for the 9 digit Mailer ID shall be 900000000-999999999. The Serial or Sequence Number shall be assigned by the mailer for uniquely identifying and tracking mailpieces. The allowable encoding range shall be 000000000–999999999 when used with a 6 digit Mailer ID and 000000-999999 when used with a 9 digit Mailer ID. e. The Delivery Point ZIP Code shall be assigned by the mailer for routing the mailpiece. This shall replace POSTNET for routing the mailpiece to its final delivery point. The length may be 0, 5, 9, or 11 digits. The allowable encoding ranges shall be no ZIP Code, 00000–99999, 000000000–999999999, and 00000000000–99999999999. An hyphen '-' is required before the zip/delivery point.
Tags
since
2015-02-21
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2015-2024 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-barcode

Table of Contents

Methods

__construct()  : mixed
Initialize a new barcode object
getArray()  : Rgb, bars: array{: int, : int, : int, : int}[]}
Get the barcode raw array
getBarsArrayXYWH()  : array<int, array{: float, : float, : float, : float}>
Get the array containing all the formatted bars coordinates
getBarsArrayXYXY()  : array<int, array{: float, : float, : float, : float}>
Get the array containing all the formatted bars coordinates
getExtendedCode()  : string
Get the extended code (code + checksum)
getGd()  : GdImage
Get the barcode as GD image object (requires GD library)
getGrid()  : string
Get a raw barcode string representation using characters
getGridArray()  : array<int, array<int, string>>
Get a raw barcode grid array
getHtmlDiv()  : string
Get an HTML representation of the barcode.
getPng()  : void
Get Barcode as PNG Image (requires GD or Imagick library)
getPngData()  : string
Get the barcode as PNG image (requires GD or Imagick library)
getPngDataImagick()  : string
Get the barcode as PNG image (requires Imagick library)
getSvg()  : void
Get the barcode as SVG image object
getSvgCode()  : string
Get the barcode as SVG code
setBackgroundColor()  : static
Set the background color
setColor()  : static
Set the color of the bars.
setSize()  : static
Set the size of the barcode to be exported

Methods

__construct()

Initialize a new barcode object

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)

$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 or rows or columns.

Tags
throws
Exception

in case of error

throws
Exception

in case of color error

getArray()

Get the barcode raw array

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

getBarsArrayXYWH()

Get the array containing all the formatted bars coordinates

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

getBarsArrayXYXY()

Get the array containing all the formatted bars coordinates

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

getExtendedCode()

Get the extended code (code + checksum)

public getExtendedCode() : string
Return values
string

getGd()

Get the barcode as GD image object (requires GD library)

public getGd() : GdImage
Tags
throws
Exception

if the GD library is not installed

Return values
GdImage

getGrid()

Get a raw barcode string representation using characters

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()

Get a raw barcode grid array

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()

Get an HTML representation of the barcode.

public getHtmlDiv() : string
Return values
string

HTML code (DIV block)

getPng()

Get Barcode as PNG Image (requires GD or Imagick library)

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'.

getPngData()

Get the barcode as PNG image (requires GD or Imagick library)

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

If true try to use the Imagick extension

Return values
string

PNG image data

getPngDataImagick()

Get the barcode as PNG image (requires Imagick library)

public getPngDataImagick() : string
Tags
throws
Exception

if the Imagick library is not installed

Return values
string

getSvg()

Get the barcode as SVG image object

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()

Get the barcode as SVG code

public getSvgCode() : string
Return values
string

SVG code

setBackgroundColor()

Set the background color

public setBackgroundColor(string $color) : static
Parameters
$color : string

Background color in Web notation (color name, or hexadecimal code, or CSS syntax)

Tags
throws
Exception

in case of color error

Return values
static

setColor()

Set the color of the bars.

public setColor(string $color) : static

If the color is transparent or empty it will be set to the default black color.

Parameters
$color : string

Foreground color in Web notation (color name, or hexadecimal code, or CSS syntax)

Tags
throws
Exception

in case of color error

throws
Exception

in case of empty or transparent color

Return values
static

setSize()

Set the size of the barcode to be exported

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 or rows or columns.

Return values
static
On this page
 

© 2004-2024 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy