如何在wordpress中生成PDF417条形码?你会使用什么php库,你会如何从functions.php调用它?这实际上是一个好的开始吗?这是我找到的东西:https://github.com/tecnickcom/tc-lib-pdf
我的理想场景是在php库之外,然后将其包含在functions.php文件中,然后使用转换为PDF417图像的参数调用它(最好是SVG,但PNG也可以)。
发布于 2018-06-04 21:10:00
如果您可以在服务器上安装Zint,我已经创建了一个可以生成这种格式条形码的PHP类。
https://github.com/delboy1978uk/php-zint
<?php
use Del\Barcode\Service\BarcodeService;
// Use [] instead of () if barcode has parenthesis
$barcodeNumber = '646496874646'; // <- whatever, not the real format
$path = realpath('/path/to/genration/folder'); // Where zint will dump the image (gets deleted after generation)
$barcodeService = new BarcodeService($path);
$image = $barcodeService->generate(
BarcodeService::TYPE_PDF_417,
$barcodeNumber
);
echo $image;https://stackoverflow.com/questions/50681274
复制相似问题