Multiple printing from the same txt Bartender Integration
Hello everyone,
I've got a situation where I'm using a particular integration to print labels from a text file. However, I'm encountering a bit of a snag. Here's a snippet of the text file:
*FORMAT,label.btw
*PRINTERNAME,printer1
*QUANTITY,1
PART,12345
QUANTITY,6
*PRINTEND
*FORMAT,label.btw
*PRINTERNAME,printer1
*QUANTITY,1
PART,67890
QUANTITY,2
*PRINTEND
Now, the issue arises because although it's the same file, the integration seems to treat each set of label instructions as distinct. So, instead of printing just two labels, it prints four.
Is there any way I can modify the integration file to indicate that there are only two labels in the text file? This would be really helpful, especially if I receive a file with multiple labels in the future. Any suggestions would be greatly appreciated!
As well I attached 4 files of how I configure my Integration file
-
Peter Thane
★ BarTender Hero ★
Why does each item have 2 quantity fields?
Where is the %Duplicates% variable declared as that is what is controlling the number of labels to be printed?
Have you tried formatting the text file to like this (I have kept the two quantity fields but one with the leading * so they are distinguishable
*FORMAT,*PRINTERNAME,*QUANTITY,PART,QUANTITY
label.btw,printer1,1,12345,6
label.btw,printer1,1,67890,6If the number of labels should be coming from either the *Quantity or Quantity then you could replace the Duplicates with a link directly to that field.
0 -
L19141170
★ BarTender Hero ★
Oh, because from *FORMAT to *PRINTEND is one label, so we have 2 labels with the same design but different information. Quantity is the value I'll use as the variable number of copies.
I realized that %DUPLICATE% is essentially the same as %QUANTITY%, so I can inform the integration how many copies I'll print for each label, I was doing some test so I forget to put %QUANTITY% for the screenshot.
I could attempt it, but the issue lies in the .txt file being generated by a different software. Editing the text file would mean altering the software responsible for generating the label fields.
With QUANTITY, I don't have a problem. The issue arises when the software generates two or more labels in a single .txt file, and the integration prints them with different information. The problem is that it generates duplicates. It doesn't matter if %QUANTITY% is set to only 1; the problem occurs when the .txt file contains three labels of the same design and printer destination. It then prints nine labels, as if it's reading the file three times, with each containing three labels. So, what I want to fix is if the .txt file only contains three labels with different information but the same design, with a quantity of 1, it should only print three. Therefore, my idea is that the integration should somehow recognize the *PRINTEND so that it only identifies three labels.
0 -
Peter Thane
★ BarTender Hero ★
the problem occurs when the .txt file contains three labels of the same design and printer destination. It then prints nine labels, as if it's reading the file three times, with each containing three labels.>>>> does the quantity on each line = 3 in which case BarTender is doing what it is told to do, ie print each record three times?
If you are adding a new line for each record anyway I would suggest you dont need to use the copies variable and just leave the label to print one copy each time (ie Copies = 1 saved in the label and the Integration set to this too)
0 -
L19141170
★ BarTender Hero ★
No, for this, Quantity is keep by 1, for all the test, but still reading the file 3 times and get 3 labels, so prints 9 in total
0 -
Peter Thane
★ BarTender Hero ★
Without a copy of the label format and BTIN file I am not sure but the layout of the trigger file would be by guess as the issue.
If you can create a test label linked to datafile configured like this (ie without the FIELD NAMES and PRINTEND converted to a carriage return)
label.btw,printer1,1,12345,6
label.btw,printer1,1,67890,2and then create an Integration to trigger when you save a file laid out as the above, with the Printer variable linked to field2, label format to field1 and the Copies to whichever of fields 3 or 5 you use and see what that does.
Integration builder can be configured to read your existing file format (below) and output it in a new file layout as above
*FORMAT,label.btw
*PRINTERNAME,printer1
*QUANTITY,1
PART,12345
QUANTITY,6
*PRINTEND
*FORMAT,label.btw
*PRINTERNAME,printer1
*QUANTITY,1
PART,67890
QUANTITY,2
*PRINTEND0
Iniciar sesión para dejar un comentario.
Comentarios
5 comentarios