1 Reply Latest reply on Nov 19, 2018 9:30 AM by Danyal Butt

    Swift - ZPL, printing correctly on first print when printer is turned on but incorrectly every print after?

    Danyal Butt

      I am trying to send two print jobs to the printer . I am trying to print the a label in the correct orientation then using ^POI to print it a second time inverted. This works when the printer has first been turned on but then every print after the first it prints the 2 labels in the same orientation almost ignoring the ^POI.

       

      My ZPL (zplData):

       

      ^XA
      ^LL600
      ^LS0
      ^BY2,2,59
      ^LH0,0
      ^FT100,400^BQN,2,10^FD##\(attendee!.id)^FS
      ^A0N,50,50^FO350,240^FD\(name)^FS
      ^A0N,40,40^FO350,290^FD\(attendee!.company)^FS
      ^XZ

       

      (zplDataFlip):

       

      ^XA
      ^POI
      ^LL600
      ^LS0
      ^BY2,2,59
      ^LH0,0
      ^FT100,400^BQN,2,10^FD##\(attendee!.id)^FS
      ^A0N,50,50^FO350,240^FD\(name)^FS
      ^A0N,40,40^FO350,290^FD\(attendee!.company)^FS
      ^XZ

       

      My Swift to print:

       

      if success! {

            thePrinterConn?.write(zplData.data(using: String.Encoding.utf8), error: errorPtr)

            thePrinterConn?.write(zplDataFlip.data(using: String.Encoding.utf8), error: errorPtr)

      }