Developer-Guide/services/codes.md
2022-02-19 13:57:38 +01:00

716 B
Executable File

Codes

Supported codes are:

  • C25
  • C39
  • C128 (C128a and C128b)
  • Codebar
  • Datamatrix
  • Aztec
  • QR

All codes expect the string to encode as parameter, the basic dimensions (width, height) and optionally the orientation for barcodes. The horizontal barcode image size will be adjusted automatically based on its length.

$c128b = new C128b('ABcdeFG0123+-!@?', 200, 50);
$c128b->saveToPngFile('path/code.png');

The barcodes can be either saved as png and jpeg or outputted directly.

C128b Code

$c128b = new C128b('ABcdeFG0123+-!@?', 200, 50);
$c128b = $C128a->get();
header ('Content-type: image/png');
imagepng($c128b);
imagedestroy($c128b);