0 Replies - 545 Views - Last Post: 18 December 2018 - 06:14 AM Rate Topic: -----

#1 Intrud3r   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 18-December 18

Code to center and print label on Zebra Printer

Posted 18 December 2018 - 06:14 AM

Hi,
have wrote a code that allows the user to set the postion of the printing on the label.

i have the following problem

the fields must maintain the same distance.
what happens is th SN field stops at the limit but the QR moves.

hi have this string to send the infot to the printer:
        Dim zplSN As String = "^FO" & SerialNumberX & "," & SerialNumberY & "^FWN^[email protected],14,7,E:ARI002.FNT^FD" & serialnumber2 & "^FS"
        Dim zplPN As String = "^FO" & partnumberX & "," & partnumberY & "^FWN^[email protected],14,7,E:ARI002.FNT^FD" & partnumberfull & "^FS"
        Dim zplIN As String = "^FO" & IndexnumberX & "," & IndexnumberY & "^[email protected],14,7,E:ARI002.FNT^FWB^FD" & indexnumber & "^FS"
        Dim ZPLweek As String = "^FO" & WeekyearX & "," & WeekyearY & "^[email protected],14,7,E:ARI002.FNT^FWB^FD" & weekyear & "^FS"
        Dim ZplQR As String = "F^BY72,72^FT" & CodigoX & "," & CodigoY & "^BXN,4,200,18,18,1,~
                      ^FH\^FD" & codigo & "^FS"

        Dim zplstring As String = " ^XA
                      ^MMT
                      ^PR2,2,2
                      ^LS0 " & zplPN & zplSN & zplIN & ZplQR & ZPLweek & " ^PQ1,0,1,Y^XZ "




And this to move the print on X/Y


this is the example up

  Private Sub btup()
        Dim snX As Integer = SerialNumberX
        Dim snY As Integer = SerialNumberY
        Dim pnX As Integer = partnumberX
        Dim pnY As Integer = partnumberY
        Dim inX As Integer = IndexnumberX
        Dim inY As Integer = IndexnumberY
        Dim wyX As Integer = WeekyearX
        Dim wyY As Integer = WeekyearY
        Dim qrX As Integer = CodigoX
        Dim qrY As Integer = CodigoY

        LBLxy.Text = "^^/>/>^^/>^/>^SN" & snY & "-QR" & qrY & "-PN" & pnY & "-IN" & inY & "-WK" & wyY & "^^/>/>^^/>^/>^"

        If snY > 3 Then
            If snY - qrY = -81 And qrY - pnY = -17 Then
                snY = snY - 1
                pnY = pnY - 1
                inY = inY - 1
                wyY = wyY - 1
                qrY = qrY - 1
            Else
                MsgBox("etiqueta fora de medidas")
                snY = SerialNumberY
                pnY = partnumberY
                inY = IndexnumberY
                wyY = WeekyearY
                qrY = CodigoY
            End If

        End If

        SerialNumberY = snY
        partnumberY = pnY
        IndexnumberY = inY
        WeekyearY = wyY
        CodigoY = qrY

    End Sub



if the position reachs 3 it stop but it only stops the moving of the SNy th QRy and The PNy will go up.

any ideas?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1