I try to automation printing labels en tapes. I can already print my labels. But when I try to select the tape printer it just prints een empty label instead of een empty tape. Any suggestions?
I got all the printers listed:
DYMO LabelWriter 450 DUO Tape =>DYMO LabelWriter 450 DUO Tape,DYMO LabelWriter 450 DUO Tape (this does not work)
DYMO LabelWriter 450 DUO Label => DYMO LabelWriter 450 DUO Label,DYMO LabelWriter 450 DUO Label (this work)
import sys
from os import path
from win32com.client import Dispatch
curdir = None
if getattr(sys, 'frozen', False):
# frozen
curdir = path.dirname(sys.executable)
else:
# unfrozen
curdir = path.dirname(path.abspath(__file__))
mylabel = path.join(curdir,'Dossier.label') #is file for tape
labelCom = Dispatch('Dymo.DymoAddIn')
labelText = Dispatch('Dymo.DymoLabels')
isOpen = labelCom.Open(mylabel)
selectPrinter = 'DYMO LabelWriter 450 DUO Tape' #DYMO LabelWriter 450 DUO Label then it prints empty label
labelCom.SelectPrinter(selectPrinter)
labelCom.StartPrintJob()
labelCom.Print(1,False)
labelCom.EndPrintJob()
I expected to print een empty tape instead of een empty label. Any idea how i can get the right printer?