Hello everyone,
I am working with custom scripts with TSC Printer, I have read its language and i can print 2000+ tags without any issue, the problem which I am facing is I am unable to pass variables in the raw printer strings to a printer
This code works perfectly
indent preformatted text by 4 spaces
{% for row in doc.items %}
{% set serial_ids_list = row.serial_no.split(“\n”) %}
{% for obj in serial_ids_list %}
SIZE 103.9 mm, 25.4 mm
DIRECTION 0,0
REFERENCE 0,0
OFFSET 0 mm
SET PEEL OFF
SET CUTTER OFF
SET PARTIAL_CUTTER OFF
SET TEAR ON
CLS
BARCODE 808,122,“39”,77,0,180,1,3,“123456”
CODEPAGE 1252
TEXT 763,40,“0”,180,8,8,“123456”
TEXT 639,156,“0”,180,6,6,“2500/-PKR”
TEXT 794,182,“0”,180,6,6,“Lipton Yellow Label”
PRINT 1,1
{% endfor %}
{% endfor %}
but this one doesn’t, it prints empty tags which means that values are not being passed
indent preformatted text by 4 spaces
{% for row in doc.items %}
{% set serial_ids_list = row.serial_no.split(“\n”) %}
{% for obj in serial_ids_list %}
SIZE 103.9 mm, 25.4 mm
DIRECTION 0,0
REFERENCE 0,0
OFFSET 0 mm
SET PEEL OFF
SET CUTTER OFF
SET PARTIAL_CUTTER OFF
SET TEAR ON
CLS
BARCODE 808,122,“39”,77,0,180,1,3,{{obj}}
CODEPAGE 1252
TEXT 763,40,“0”,180,8,8,{{obj}}
TEXT 639,156,“0”,180,6,6,{{ frappe.db.get_value(“Item Price”, {“item_code”: row.item_code, “price_list”: “Standard Selling”}, “price_list_rate” ) }}
TEXT 794,182,“0”,180,6,6,{{row.item_name}}
PRINT 1,1
{% endfor %}
{% endfor %}
any help will be greatly appreciated