LOGMARS

LOGMARS barcode in PHP: the MIL-STD-1189B CODE 39 profile, input range, code example and SVG output

LOGMARS is CODE 39 as the United States military profiles it for logistics labelling. The encoding is identical to CODE 39; the standard fixes the dimensions, the bar ratio and the human readable line.

Type Token

ItemValue
Type tokenLOGMARS
Enum caseBarcodeType::LOGMARS
FamilyLinear
StandardMIL-STD-1189B
Class\Com\Tecnick\Barcode\Type\Linear\Logmars

Input

ItemValue
Character setas CODE 39
Length1 to 30000 characters
Checkmodulo 43, appended by the library
Extra parametersnone

Examples

A part number

<?php

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

$barcode = new \Com\Tecnick\Barcode\Barcode();
$bobj = $barcode->getBarcodeObj(
    type: 'LOGMARS',
    code: '12345/ABCDE',
    width: -3,
    height: -30,
    color: 'black',
    padding: [0, 0, 0, 0],
)->setBackgroundColor('white');

echo $bobj->getInlineSvgCode();

LOGMARS barcode encoding 12345/ABCDE

Errors

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

PayloadMessage
abc!Invalid character: 33

See Also