更改mpdf中Ean-13的默认大小

Change the default size of Ean-13 in mpdf

有什么方法可以将ean-13的默认大小更改为mpdf。 这是我的代码,但对我来说太大了。

<barcode code="'.$Ean.'" type="EAN13" class="barcode" />

mpdf manual 的条形码部分,您可以传递一个尺寸参数:

$size Specifies the size of the barcode.

$size (float) will scale the nominal size of the barcode as a factor of 1

size="1.5" will generate a barcode one and half times the height and width of the nominal size set in mPDF

NB Sizes between '0.8' and '2.0' are recommended for EAN13 and similar barcodes.

Default: '1'

指定此设置应该允许您控制条形码的大小,例如:

<barcode code="'.$Ean.'" type="EAN13" class="barcode" size="0.8" />