ITF-14

ITF-14 shipping container barcode in PHP: GTIN-14 input, check digit, code example and SVG output

ITF-14 carries a GTIN-14, the trade item number of a shipping case or a pallet layer. It is Interleaved 2 of 5 inside a heavy rectangular frame, the bearer bar, which is there because corrugated board prints badly: without it a partial scan can be read as a valid shorter code.

The GTIN comes from a GS1 company prefix, which a GS1 member organisation issues.

Type Token

ItemValue
Type tokenITF14
Enum caseBarcodeType::ITF14
FamilyLinear
StandardGS1 General Specifications
Class\Com\Tecnick\Barcode\Type\Linear\ItfOneFour

Input

ItemValue
Character setdigits
Length13 digits, or 14 with a valid check digit
Checkmodulo 10, appended when the payload is 13 digits and verified when it is 14
Extra parametersnone

Examples

A GTIN-14

<?php

require_once __DIR__ . '/vendor/autoload.php';

$barcode = new \Com\Tecnick\Barcode\Barcode();
$bobj = $barcode->getBarcodeObj(
    type: 'ITF14',
    code: '09312345678907',
    width: -1,
    height: -1,
    color: 'black',
    padding: [0, 0, 0, 0],
)->setBackgroundColor('white');

echo $bobj->getInlineSvgCode();

ITF-14 barcode encoding 09312345678907

Errors

These payloads raise \Com\Tecnick\Barcode\Exception:

PayloadMessage
1234567890123AInput code must be a number
09312345678900Invalid check digit: 7

See Also