Search code examples
barcodempdfean-13

MPDF EAN13 barcode number at the buttom make it bold


I'm generating barcode using MPDF

using this code

$bar_type = EAN13

$data_waltermart = ex. 2000027317400

<barcode type='".$bar_type."' code='".$data_waltermart[0]['sku_cust']."' class='barcode' size='0.8' height='0.5'></barcode>

now I'm trying to make this area "Bold"

enter image description here

I know that the number is automatic generated by the EAN13 MPDF. But is there a way to make this bold even through CSS.

It will be highly appreciate if someone has an idea how to hack this area :)

Thanks in advance.


Solution

  • No, there is no way to alter mPDF barcode text appearance without modifying mPDF code directly.


    Judging from the output. you create your mPDF object with c core-fonts-only mode.

    Technically, you could ommit the mode constructor parameter and then substitute hard-coded barcode ocrb font for a bold variant or any other font you find more to your liking.

    Also see the chapter of the documentation on Fonts.