Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. Help with label printing SDK from Seagull bartender

Help with label printing SDK from Seagull bartender

Scheduled Pinned Locked Moved Windows Forms
helpjsontutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    ziscoooo
    wrote on last edited by
    #1

    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

    D 1 Reply Last reply
    0
    • Z ziscoooo

      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

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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...

      Z 1 Reply Last reply
      0
      • D Dave Kreskowiak

        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...

        Z Offline
        Z Offline
        ziscoooo
        wrote on last edited by
        #3

        thanks for response much appreciated

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups