バーコードを生成する
の編集
https://yassu.jp/pukiwiki/index.php?%A5%D0%A1%BC%A5%B3%A1%BC%A5%C9%A4%F2%C0%B8%C0%AE%A4%B9%A4%EB
[
トップ
] [
編集
|
差分
|
バックアップ
|
添付
|
リロード
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
-- 雛形とするページ --
(no template pages)
[[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'); *バーコードの種類を調べる [#k75c0611] バーコードの実物はあるけど使用されている種類がわからないという場合は以下のアプリで判別できました。~ [[バーコードスキャナのプロ:https://play.google.com/store/apps/details?id=com.geekslab.qrbarcodescanner.pro&hl=ja]]
タイムスタンプを変更しない
[[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'); *バーコードの種類を調べる [#k75c0611] バーコードの実物はあるけど使用されている種類がわからないという場合は以下のアプリで判別できました。~ [[バーコードスキャナのプロ:https://play.google.com/store/apps/details?id=com.geekslab.qrbarcodescanner.pro&hl=ja]]
テキスト整形のルールを表示する