- 追加された行はこの色です。
- 削除された行はこの色です。
[[PHPめも]]
PHPで1次元のバーコードを生成します。
使用するツールは [[PHP Barcode Generator:https://github.com/picqer/php-barcode-generator]] です。
PEARでは [[Image_Barcode2:https://pear.php.net/package/Image_Barcode2]] があります。
<?php
require_once 'vendor/autoload.php';
$generator = new Picqer\Barcode\BarcodeGeneratorHTML();
/**
* @param string $code code to print
* @param string $type type of barcode
* @param int $widthFactor Width of a single bar element in pixels.
* @param int $totalHeight Height of a single bar element in pixels.
* @param int|string $color Foreground color for bar elements (background is transparent).
*/
echo $generator->getBarcode('081231723897', $generator::TYPE_EAN_13, 2, 30, 'black');