Specifying Printer Within Trigger File
I am running BarTender 9.2 with Commander. I have my BTW set up with a printer specfied in it - I don't know of any way around this. I am trying to specify a printer in my trigger file using the /PRN ex:/PRN="MyPrinter-Name". I have tried it with and without quotes and with and without the print server name ex: /PRN="Myserver\MyPrinter-Name". My commander task has been set up with Printer to Use - Specified in Format. I also tried it with Printer to Use - System printer.
No matter what I have tried, it prints to the printer specified in my BTW. Is there some other setting I am missing that will enable me to specify the printer inside the trigger file?
Thanks!
No matter what I have tried, it prints to the printer specified in my BTW. Is there some other setting I am missing that will enable me to specify the printer inside the trigger file?
Thanks!
0
-
The correct parameter is /PRN="PrinterName" with the printer name being that as listed in the computer running BarTender/Commander. Could you give us a full view of the Commander Script you are using?
Be sure to take a look at the below white paper:
http://s3.amazonaws.com/SeagullBarTender/ftp/WhitePapers/WhitePaper_CommanderExamples_English.pdf0 -
Legacy Poster
★ BarTender Hero ★
Thanks for your reply, Ian.
I have read that White Paper as well as the examples previously and reviewed them both this morning before I posted. As I said before, I have tried various permutations of values. I've moved the /PRN to be after the /D when it did not work where it was before. I've had quotes around the printer name, no quotes, etc.
Here's my most recent version:
%BTW% /AF="C:\Users\markind\Documents\LabelTesting\LabelFormats\Process_Label.btw" /D="%Trigger File Name%" /PRN="Brady-IP300-C123" /R=3 /P
I have tried it with the print server name:
%BTW% /AF="C:\Users\markind\Documents\LabelTesting\LabelFormats\Process_Label.btw" /D="%Trigger File Name%" /PRN="//PRINTSRV1/Brady-IP300-C123" /R=3 /P
I know the trigger file is being read because the labels will print to my BTW defined printer based on the information following the %BTW line I have above.
I have confirmed I can print from BarTender on this server to this printer and it is defined as Brady-IP300-C123 on PRINTSVR1.
Any other ideas?0 -
Shotaro Ito
★ BarTender Hero ★
To print to a shared network printer, you need to either run Commander as application, run commander service by an account which has print rights or specify a log on account for command handler.
[url="http://seagullscientific.invisionzone.com/index.php?/topic/108-network-share/"]This post[/url] and troubleshooting guide within might helps.0 -
In general you should always be in the habit of putting resource names and locations between quotes. They are only really needed if there is a space character in the path/name, but if you always use quotes then you'll never go wrong.
In the example you give I note that you have bad syntax in the UNC path to the printer resource. You need to use a back-slash character rather than a forward-slash.
/PRN="\\PRINTSRV1\Brady-IP300-C123"
The is the case for all UNC path references.
http://en.wikipedia.org/wiki/Path_(computing)0 -
Legacy Poster
★ BarTender Hero ★
Shotaro, thank you for your reply.
I read the post you reference before I posted my original question. I have been testing this by running Commander as an application. I logged in with my user id which is authorized to use the printer - I am able to open BarTender and print on this server to the same printer. It is till not working.0 -
Did you see my last post? Did that not help? 0 -
Legacy Poster
★ BarTender Hero ★
[quote name='Ian C - Seagull Support' timestamp='1334562451' post='2219']
In general you should always be in the habit of putting resource names and locations between quotes. They are only really needed if there is a space character in the path/name, but if you always use quotes then you'll never go wrong.
In the example you give I note that you have bad syntax in the UNC path to the printer resource. You need to use a back-slash character rather than a forward-slash.
/PRN="\\PRINTSRV1\Brady-IP300-C123"
The is the case for all UNC path references.
http://en.wikipedia.org/wiki/Path_(computing)
[/quote]
Ian, thanks for your reply. Updating it to backslashes did not resolve the problem. It is still not working.
If I change the Commander task to always print to specific printer (Printer to Use - System Printer), it will ignore the printer defined in the BTW as well as the /PRN in my trigger file and print to the one I specify to always use. But, if I have the task set up with the Printer to Use as 'Specified in the Format', it will NOT use the printer I have in the trigger file. I know I have an older version, 9.2. I have not been able to get it to use the /PRN specified in my trigger file regardless of the Printer to Use value. Any more ideas? Is there something special I need to do in my BTW? I have not seen how to NOT specify a printer in the BTW.
Thanks!0 -
Can you paste into a reply the full contents of the trigger file, including the data, for me to examine. Feel free to replace actual data with some dummy data if it contains sensitive information.
Also attach to the post your Commander task list file (*.tl) for me to examine.
As BarTender is a printing application, specifying no driver in the BarTender label format is not possible. The same can be said of Microsoft Word.
Clearly something is not correct, we just need to discover what.0 -
Legacy Poster
★ BarTender Hero ★
[quote name='Ian C - Seagull Support' timestamp='1334589880' post='2227']
Can you paste into a reply the full contents of the trigger file, including the data, for me to examine. Feel free to replace actual data with some dummy data if it contains sensitive information.
Also attach to the post your Commander task list file (*.tl) for me to examine.
As BarTender is a printing application, specifying no driver in the BarTender label format is not possible. The same can be said of Microsoft Word.
Clearly something is not correct, we just need to discover what.
[/quote]
OK, thanks. Here's one of my test files:
%BTW% /AF="C:\Users\markind\Documents\LabelTesting\LabelFormats\Process_Label.btw" C="2" /D="%Trigger File Name%" /PRN="\\rucdrbarcode\Brady-IP300-C123" /R=3 /P
COPYTest1,KEY1,Client1,Service 1
COPYTest2,KEY2,Client2,Service 2
COPYTest3,KEY3,Client3,Service 3
I have attached my TL file.
Originally, I started testing with one format. The task 'Sample Process Label' has the format specified in it. I suspect this is why, regardless of the Printer to Use setting, it always print to the same printer (the one in the BTW). But, at least it uses the data inside the trigger file.
I created a new Task where I don't specify the format to use, NoFormat. It will not print at all but I can see that it picks up my files and renames them. I also see an error in the system Event log:
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID
{B9425246-4131-11D2-BE48-004005A04EDF}
and APPID
Unavailable
to the user DOMAIN\DiffUserID SID (S-1-5-21-1166882903-344982405-262303683-13788) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.
The DOMAIN\DiffUserID is the user id set up to run the Commander as a service - but I'm trying to run it as an application so I am not sure why I would get this error. I have also tested moving everything from under the User\ file directory to just off the root directory - still doesn't work.
Thanks!0 -
Your Commander script is missing the %END% command on the second line. This would then make the /R=3 command correct because then the data really would start on row 3 of the trigger file. I also note that the copies command was missing the forward-slash character, and it doesn't need quotes for the value.
The script should therefore look like this:
%BTW% /AF="C:\Users\markind\Documents\LabelTesting\LabelFormats\Process_Label.btw" /C=2 /D="%Trigger File Name%" /PRN="\\rucdrbarcode\Brady-IP300-C123" /R=3 /P
%END%
COPYTest1,KEY1,Client1,Service 1
COPYTest2,KEY2,Client2,Service 2
COPYTest3,KEY3,Client3,Service 3
Upon looking at the Commander task list I note that you are running "BarTender" commands rather than Commander Script commands in order to have Commander interpret the contents of the trigger so that it know what to do. Modify this in the properties of you task, selecting the "Commands" tab, and then for the "Command Type" select "Commander Script" instead of "BarTender". Once done there are no other options to modify there unless you wish to tweak the command handler to process the jobs.0 -
Legacy Poster
★ BarTender Hero ★
[quote name='Ian C - Seagull Support' timestamp='1334672377' post='2237']
Your Commander script is missing the %END% command on the second line. This would then make the /R=3 command correct because then the data really would start on row 3 of the trigger file. I also note that the copies command was missing the forward-slash character, and it doesn't need quotes for the value.
The script should therefore look like this:
%BTW% /AF="C:\Users\markind\Documents\LabelTesting\LabelFormats\Process_Label.btw" /C=2 /D="%Trigger File Name%" /PRN="\\rucdrbarcode\Brady-IP300-C123" /R=3 /P
%END%
COPYTest1,KEY1,Client1,Service 1
COPYTest2,KEY2,Client2,Service 2
COPYTest3,KEY3,Client3,Service 3
Upon looking at the Commander task list I note that you are running "BarTender" commands rather than Commander Script commands in order to have Commander interpret the contents of the trigger so that it know what to do. Modify this in the properties of you task, selecting the "Commands" tab, and then for the "Command Type" select "Commander Script" instead of "BarTender". Once done there are no other options to modify there unless you wish to tweak the command handler to process the jobs.
[/quote]
You rock, Ian, thanks for your help. Earlier I had trouble when I had the END so I removed it. Putting it back - I needed to change the /R=3 to /R=2 or it skipped my first label. But the kicker was changing to Commander script. I'm now printing to different printers based on the /PRN in my trigger file. THANKS!0 -
Note that the %END% needs to be on its own line. If you are needing to put in /R=2 it might be because the %END% is on the same line as the other Command script commands.
Does the first line of the delimited data contain the record header?
If yes then you first need to make sure that this is enabled in the Database setup of the label format. Then in the script use the /DbTextHeader=3 /R=3 commands to make sure BarTender starts reading the data from the correct point.
If no then you first need to make sure that this is enabled in the Database setup of the label format. Then in the script use the /R=3 command only.0 -
Legacy Poster
★ BarTender Hero ★
[quote name='Ian C - Seagull Support' timestamp='1334734248' post='2248']
Note that the %END% needs to be on its own line. If you are needing to put in /R=2 it might be because the %END% is on the same line as the other Command script commands.
Does the first line of the delimited data contain the record header?
If yes then you first need to make sure that this is enabled in the Database setup of the label format. Then in the script use the /DbTextHeader=3 /R=3 commands to make sure BarTender starts reading the data from the correct point.
If no then you first need to make sure that this is enabled in the Database setup of the label format. Then in the script use the /R=3 command only.
[/quote]
OK, I have it now. I have had %END% on a separate line. The problem was that I had the BTWs set up to expect a header line in the data file but I was not including it in the files I dropped for Commander. I will keep these in sync now. Thanks again!0
Iniciar sesión para dejar un comentario.
Comentarios
13 comentarios