如何使用tc-lib-barcode指定参数,例如“ X尺寸”和“ Y尺寸”

我正在与一家需要我们生成PDF417条码的公司合作开发API。他们在发送给我们的文档中要求他们使用以下设置:

XDim = 0.02
YDim = 0.03
Bar Height = 0.30
Aspect = 0.25
Columns = 16 or 18
Rows = 0
ECC = 4
Containment area is about 1000 X 5000 unit of pixels

According to the sole example in the documentation of the tc-lib-barcode library I'm using, these are the parameters I can work with:

// generate a barcode
$bobj = $barcode->getBarcodeObj(
    'QRCODE,H',                     // barcode type and additional comma-separated parameters
    'https://tecnick.com',          // data string to encode
    -4,                             // bar width (use absolute or negative value as multiplication factor)
    -4,                             // bar height (use absolute or negative value as multiplication factor)
    'black',                        // foreground color
    array(-2, -2, -2, -2)           // padding (use absolute or negative values as multiplication factors)
    )->setBackgroundColor('white'); // background color

如您所见,公司和tc-lib-barcode使用不同的名称作为参数,或者tc-lib-barcode可能不支持我需要更改的参数。 tc-lib-barcode文档中没有有关“ XDim”,“ YDim”等的内容。因此,我尝试将公司的规格映射到tc-lib-barcode文档中的参数。

According to the Wikipedia article on PDF417:

“用户可以决定最窄的垂直条的宽度(X尺寸)以及行的高度(Y尺寸)。”

So perhaps XDim == bar width?

In \src\Type\Square\PdfFourOneSeven.php, I see:

 /**
     * Row height respect X dimension of single module
     *
     * @var int
     */
    protected $row_height = 2;

So I thought maybe YDim == $row_height. I changed $row_height to .03 but then I got an error (Undefined offset: 2 thrown by line 85 in \src\Type\Raw.php).

我似乎在以错误的方式进行操作,确实可以使用一些帮助。我已经联系了该公司,但他们只是告诉我购买可以产生兼容条形码的2个软件包之一。许可证超出了我们的预算,并且由于PDF417是ISO标准,因此几乎不可能与任何软件包产生兼容的条形码。

I notice that in the first parameter of getBarcodeObj, you can pass "additional comma-separated parameters" but I see no documentation on what parameters, and in what order, you can pass there.