Command Handler With /p.. But Don't Want Blank Labels At Start 追蹤

0
Avatar
Legacy Poster

I am using Commander with a TCP trigger and BTXML, and my command handler  has the following startup command:

"/AF="C:\label_files\4inchRoll2.btw" /PRN="Zebra GX420d - ZPL" /P /C=2".  However, each time I stop and start detection I get two labels printed (without any data).  Is there any way around this?

 

I want to have my command handlers specify the file to print and the printer, and the number of copies.  I don't want to have to include this in the BTXML.. I want that to be generic so it can be redirected to different printers with different formats/sizes just by sending to a different task/tcp port.

 

 

5 意見

0
Avatar
Michael Toupin (mtoupin
評論操作 永久連結

When you're putting a startup command, that fires when you start detection.  So in your case you'll want to actually leave the startup section empty.

0
Avatar
Legacy Poster
評論操作 永久連結

So how can I set the printer and document if the startup section is empty?

0
Avatar
Domingo Rodriguez
版主
評論操作 永久連結

When using BTXML Script you need to define the printer and BarTender document inside the BTXML Script file. The only workaround I can think of is that you detect the original BTXML Script file, then run a "Search and Replace" Transform over this original trigger file to add the desired BarTender document and printer, you then save the new BTXML Script file to file using the "Save To File" command type, and then a new task (which only runs a "BarTender XML Script" command type) will detect the new trigger file on a certain folder and process it (now with the printer and document name added).

 

A different solution would be to create several tasks in your task list and make use of the "BarTender" command instead. This way, you can directly set the printer and document for each single task by modifying the configuration for the "BarTender" command.

0
Avatar
Legacy Poster
評論操作 永久連結

I explicitly don't want to define the printer and BarTender document inside the BTXML Script file.

 

I have it working with several tasks in the task list, each using the BTXML Script command type, and referencing a command handler which specifies the printer.

 

The dumb blank label problem can be dealt with by just using a longer timeout before it closes the document.

 

If it isn't supposed to work this way it needs to be documented.

 

When using BTXML Script you need to define the printer and BarTender document inside the BTXML Script file. The only workaround I can think of is that you detect the original BTXML Script file, then run a "Search and Replace" Transform over this original trigger file to add the desired BarTender document and printer, you then save the new BTXML Script file to file using the "Save To File" command type, and then a new task (which only runs a "BarTender XML Script" command type) will detect the new trigger file on a certain folder and process it (now with the printer and document name added).

 

A different solution would be to create several tasks in your task list and make use of the "BarTender" command instead. This way, you can directly set the printer and document for each single task by modifying the configuration for the "BarTender" command.

0
Avatar
Legacy Poster
評論操作 永久連結

I have concluded that Domingo is right and I should just go ahead and put the printer name and format inside the XML file - this means i have to add more intelligence about printer and format names into my application, but it seems to be unavoidable.

登入寫評論。