Barcode Not Print in Custom Print Format

I am addes barcode field in item and auto generate 12 digit barcode it generate svg if use Barcode Field Type.
When i try to fetch these in print format in Asset doctype using item_code it only show barcode number not show barcode svg image.

Hi @janakvaghela542,

try it in the custom print format.

<div class="barcode-field">
    {{doc.your_barcode_field}} <!-- Replace this with the appropriate barcode field tag used -->
  </div>

Thank You!

This not work it shows only barcode number i want svg image of barcode.

Hi @janakvaghela542,

It’s worked from my end. Please check it.

<div class="barcode-wrapper">
    {{ doc.barcode | safe }}
</div>

Output:

Thank You!

When i Use this code:

{{ doc.barcode | safe }}

Output is:

My frappe erpnext version is:
ERPNext:v14.44.0 (version-14)
Frappe Framework:v14.52.0 (version-14)

Hi @janakvaghela542,

Please check the field type. My field type is barcode.

Thank You!

Yes My field type is also barcode.

Try To fetch this barcode in another doctype and create print format for that.

Please check it.

Output:

Thank You!

Hey @NCP how do you print multiple items in a single sheet? I have a A4 labels sheet with 4x10 grid, I want to be able to print many barcodes at once, thoughts? Thanks!

Hi @alphaomegaphi,

You can develop the custom print format and set it according to the scenario with your own logic and also you can manage the barcode side according to the scenario. A sample script is provided in post, so find it.

Thank You!