Help with label printing SDK from Seagull bartender
-
Hello I'm Using Bartender 9.2 SDK ,i need to print multiple labels format in the same page ,for example i'm using laser printer with A4 stickers papers (24 rows*6 columns) which it means 144 label for every page ,my problem is when i print multiple labels format ,lets say the first format have 20 identical data that left the rest of page empty and start the new format in the next page which its waste my papers, I plan to print multiple separate .btw files(bartender label format) on the same paper here the code I'm using
Try
Dim copies As String
Dim price As String
Dim EXP As String
Dim ItemName As String
GetPharmacyName()
GetValuesFromGrid()
ReDim myarray(myarr.Length - 1)
myarr.CopyTo(myarray, 0)
Using btEngine As New Engine(True)
btEngine.Start()
For i = 0 To UBound(myarray)
If myarray(i) <> -1 Then
copies = dgvOrders.Item(3, myarray(i)).Value
price = GetPrice(dgvOrders.Item(0, myarray(i)).Value.ToString)
EXP = dgvOrders.Item(2, myarray(i)).Value.ToString
ItemName = dgvOrders.Item(1, myarray(i)).Value.ToString
Dim Barcode As String = GetID(dgvOrders.Item(0, myarray(i)).Value.ToString)
Dim btFormat As LabelFormatDocument = btEngine.Documents.Open("C:\Standard.btw")
'btFormat.PrintSetup.NumberOfSerializedLabels = 4
If copies <> 0 Then
btFormat.PrintSetup.IdenticalCopiesOfLabel = copies
btFormat.SubStrings("ID").Value = Barcode
btFormat.SubStrings("Pharmacy_Name").Value = Pharm_Name
btFormat.SubStrings("Price").Value = "Price: " & price & " SDG "
' btFormat.SubStrings("Pharmacy_Tel").Value = Tel
btFormat.SubStrings("EXP").Value = "EXP Date: " & EXP
btFormat.SubStrings("Item").Value = "Item : " & ItemName
' Print the label
Dim result As Result = btFormat.Print()
btFormat.Close(SaveOptions.DoNotSaveChanges)
End If
End If
Next i
btEngine.Stop(SaveOp -
Hello I'm Using Bartender 9.2 SDK ,i need to print multiple labels format in the same page ,for example i'm using laser printer with A4 stickers papers (24 rows*6 columns) which it means 144 label for every page ,my problem is when i print multiple labels format ,lets say the first format have 20 identical data that left the rest of page empty and start the new format in the next page which its waste my papers, I plan to print multiple separate .btw files(bartender label format) on the same paper here the code I'm using
Try
Dim copies As String
Dim price As String
Dim EXP As String
Dim ItemName As String
GetPharmacyName()
GetValuesFromGrid()
ReDim myarray(myarr.Length - 1)
myarr.CopyTo(myarray, 0)
Using btEngine As New Engine(True)
btEngine.Start()
For i = 0 To UBound(myarray)
If myarray(i) <> -1 Then
copies = dgvOrders.Item(3, myarray(i)).Value
price = GetPrice(dgvOrders.Item(0, myarray(i)).Value.ToString)
EXP = dgvOrders.Item(2, myarray(i)).Value.ToString
ItemName = dgvOrders.Item(1, myarray(i)).Value.ToString
Dim Barcode As String = GetID(dgvOrders.Item(0, myarray(i)).Value.ToString)
Dim btFormat As LabelFormatDocument = btEngine.Documents.Open("C:\Standard.btw")
'btFormat.PrintSetup.NumberOfSerializedLabels = 4
If copies <> 0 Then
btFormat.PrintSetup.IdenticalCopiesOfLabel = copies
btFormat.SubStrings("ID").Value = Barcode
btFormat.SubStrings("Pharmacy_Name").Value = Pharm_Name
btFormat.SubStrings("Price").Value = "Price: " & price & " SDG "
' btFormat.SubStrings("Pharmacy_Tel").Value = Tel
btFormat.SubStrings("EXP").Value = "EXP Date: " & EXP
btFormat.SubStrings("Item").Value = "Item : " & ItemName
' Print the label
Dim result As Result = btFormat.Print()
btFormat.Close(SaveOptions.DoNotSaveChanges)
End If
End If
Next i
btEngine.Stop(SaveOpYour best source of information on this would be the people who wrote the library you're using. Here...[^] It's very unlikely anyone here would have used the library or, if they did, would see your question any time soon.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
Your best source of information on this would be the people who wrote the library you're using. Here...[^] It's very unlikely anyone here would have used the library or, if they did, would see your question any time soon.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...