ferrari label ok

This commit is contained in:
neo 2024-09-13 11:32:14 +02:00
parent 099cb7a93e
commit 9e0bc33904
2 changed files with 11 additions and 9 deletions

View File

@ -38,7 +38,7 @@ description_field: descrizione
[label_printer]
platform: windows
printer: Zebra_Technologies_ZTC_ZD421-203dpi_ZPL
printer: zd420
[recipes_defaults]
tester_discharge_enable: yes

View File

@ -2,22 +2,24 @@ import time
from datetime import datetime
from PyQt5.QtWidgets import QApplication
from fiona.model import Object
from src.components.os_label_printer import *
from src.lib.helpers import ConfigReader
system_id = "ST-TEN-1"
config = ConfigReader(system_id=system_id)
SYSTEM_ID = "ST-TEN-1"
START_SN=1
STOP_SN=40
TEMPLATE="ferrari_30x16_203.prn"
PRINTER_NAME="Zebra_Technologies_ZTC_ZD421-203dpi_ZPL"
config = ConfigReader(system_id=SYSTEM_ID)
config["label_printer"]["printer"] = PRINTER_NAME
printer=Os_Label_Printer(config=config,name="label_printer")
START_SN=1
STOP_SN=6
timenow = datetime.now()
app = QApplication(sys.argv)
for sn in range(START_SN,STOP_SN):
for sn in range(START_SN,STOP_SN+1):
print(f"PRINTING LABEL # {sn}")
context = {
# RECIPE DATA
@ -40,6 +42,6 @@ for sn in range(START_SN,STOP_SN):
"SS": timenow.strftime("%S"),
"JJJ": timenow.strftime("%j"),
}
printer.print_label("ferrari_30x16_203.prn",context)
printer.print_label(TEMPLATE,context)
time.sleep(1)