Swift - ZPL, printing correctly on first print when printer is turned on but incorrectly every print after?
up vote
0
down vote
favorite
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
Swift to send Job to printer:
if success! {
thePrinterConn?.write(zplData.data(using: String.Encoding.utf8), error: errorPtr)
thePrinterConn?.write(zplDataFlip.data(using: String.Encoding.utf8), error: errorPtr)
}
swift zpl-ii
add a comment |
up vote
0
down vote
favorite
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
Swift to send Job to printer:
if success! {
thePrinterConn?.write(zplData.data(using: String.Encoding.utf8), error: errorPtr)
thePrinterConn?.write(zplDataFlip.data(using: String.Encoding.utf8), error: errorPtr)
}
swift zpl-ii
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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
Swift to send Job to printer:
if success! {
thePrinterConn?.write(zplData.data(using: String.Encoding.utf8), error: errorPtr)
thePrinterConn?.write(zplDataFlip.data(using: String.Encoding.utf8), error: errorPtr)
}
swift zpl-ii
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
Swift to send Job to printer:
if success! {
thePrinterConn?.write(zplData.data(using: String.Encoding.utf8), error: errorPtr)
thePrinterConn?.write(zplDataFlip.data(using: String.Encoding.utf8), error: errorPtr)
}
swift zpl-ii
swift zpl-ii
asked yesterday
Danyal2020
134
134
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Figured it out. The printer saves the orientation of the print after ^POa is used, so you have to define what orientation you want every time.
My ZPL (zplData):
^XA
^PON
^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
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Figured it out. The printer saves the orientation of the print after ^POa is used, so you have to define what orientation you want every time.
My ZPL (zplData):
^XA
^PON
^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
add a comment |
up vote
0
down vote
Figured it out. The printer saves the orientation of the print after ^POa is used, so you have to define what orientation you want every time.
My ZPL (zplData):
^XA
^PON
^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
add a comment |
up vote
0
down vote
up vote
0
down vote
Figured it out. The printer saves the orientation of the print after ^POa is used, so you have to define what orientation you want every time.
My ZPL (zplData):
^XA
^PON
^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
Figured it out. The printer saves the orientation of the print after ^POa is used, so you have to define what orientation you want every time.
My ZPL (zplData):
^XA
^PON
^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
answered yesterday
Danyal2020
134
134
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371371%2fswift-zpl-printing-correctly-on-first-print-when-printer-is-turned-on-but-inc%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown