Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check-in Label Printing - Zebra Printers and Tear Off Mode #831

Closed
bwitting opened this issue Feb 9, 2015 · 16 comments
Closed

Check-in Label Printing - Zebra Printers and Tear Off Mode #831

bwitting opened this issue Feb 9, 2015 · 16 comments

Comments

@bwitting
Copy link

bwitting commented Feb 9, 2015

@edmistj,

First off, I'm not sure if this is an issue or a "feature" :)

We are using Zebra printers with cutters. I'd like to use Delayed Cut, so I edited the following in the Success.ascx.cs block from:

byte[] toSend = System.Text.Encoding.ASCII.GetBytes(printContent);

to:

byte[] toSend = System.Text.Encoding.ASCII.GetBytes("^XA^MMD^XZ^XA^JUS^XZ" + printContent + "~JK"); 

That should force the printer settings to Delayed Cut mode, send the label, then append the cut command.

But that isn't working - The label prints, but it doesn't cut. And the printer switches back to Tear Off mode every time. So I tried just setting the printer to "Cutter" mode so it cuts after each label. But the same problem happens: every time I send a label from the iPad check-in app (either from the original code or my modified code), the printer changes back to Tear Off mode. I can't find anywhere in the code where this is being sent. If I send the ^XA^MMD^XZ^XA^JUS^XZ command from the Zebra console, it changes the printer to delayed cut mode. But no matter what I set it to or from where I set it (ZebraNet Bridge, the printserver, etc), it always changes back to Tear Off mode.

I feel like this is a bug, but if it's on purpose, I'd love to know how it's being done so I can change it so the printers stay in Cutter mode (or better yet, delayed cut). I have lots of brand new printers with cutters.... Thanks!

@jonedmiston
Copy link
Member

You might check the ZPL of the labels. That's the only communication from Rock to the printer. Perhaps there's ZPL in them that's resetting the configuration? You can get to the ZPL for the labels under "Admin Tools > Defined Types > Checkin Labels'. Then just click on the label icon. Let me know if you find anything in there.

You could also try appending your cut zpl code at the end of the label where you want the cut to occur.

@bwitting
Copy link
Author

Thanks Jon! I'll check that out.

@bwitting
Copy link
Author

@edmistj Yup, setting the cut mode in the label was the problem. Thanks for the suggestion!

Just for your own knowledge, it looks like you can't add the cut (~JK) command to the end of the label file. (https://km.zebra.com/kb/index?page=content&id=SO7607) I'll keep working on that one.

@dcs619
Copy link
Contributor

dcs619 commented Feb 10, 2015

@bwitting I'd be interested to hear your findings on this. We currently cut every label but it would be nice to delay the cut.

@bwitting
Copy link
Author

@dcs619 no problem, I'll keep you in the loop!

@jonedmiston
Copy link
Member

@bwitting We'll take your findings and add them to the check-in docs as a tip.

@nairdo
Copy link
Member

nairdo commented Feb 10, 2015

@bwitting, also try adding a new, plain 'cut label' with the ~JK commands in a separate file/label. Then you can try adding it as the last label.

@bwitting
Copy link
Author

@nairdo That is almost working. I am sending the cut command in a separate file and it activates the cutter! However, I can't figure out how to change the order the tags get sent to the printer - it is always doing the cut first, then printing the label.

@bwitting bwitting reopened this Apr 7, 2015
@bwitting
Copy link
Author

bwitting commented Apr 7, 2015

I hope this is OK - I want to reopen this issue. Is there any way I can change the order that the check-in labels are being sent to the printer? @nairdo 's idea is right on, but without being able to change the order, the cut command usually comes at the beginning of the print instead of the end, and that's no good!

@azturner
Copy link
Contributor

Opened a new issue for the ordering ( #1007 ), closing this issue.

@dcs619
Copy link
Contributor

dcs619 commented Aug 12, 2015

@nairdo @bwitting I wasn't able to get this to work? I've tried adding ~JK in a the last label as well as sending ~JK to the printer after the job was complete. With the printer in tear-off mode, it never cuts.

@nairdo
Copy link
Member

nairdo commented Aug 19, 2015

@dcs619 My earlier tip was only based on what I had read in the Zebra docs, not something I had working. I think @bwitting is your best bet for actual experience with this need.

@dcs619
Copy link
Contributor

dcs619 commented Aug 26, 2015

@bwitting @nairdo Got it working. See NewSpring/Rock-Plugins#190

The ~JK command never worked for me as part of the core printing process. It seemed to work sending commands directly from the Zebra configuration center but would randomly stop cutting.

You will need to modify the core Checkin\Success.ascx.cs block to add this capability. I modified our print code to batch all the labels content then send one final job to the printer.

@nairdo
Copy link
Member

nairdo commented Apr 1, 2016

@bwitting Bronson, so how did you guys at your church ultimately solve this on your side? The core team is looking for a universal way to address this in v6 for others using the Windows client, iOS client, and server.

@bwitting
Copy link
Author

bwitting commented Apr 3, 2016

@nairdo We actually copied the GetFile handler and added some code to do what we needed with the labels (Sorry, our GitHub project isn't public right now, but you can get the files here.) Then, we just altered the check-in Success.ascx.cs to use GetCheckinLabels instead of GetFile.

FYI - we are using iPads and defining a Printer Override in each iPad.

@bwitting
Copy link
Author

bwitting commented Apr 3, 2016

The solution from @dcs619 (which is awesome, by the way) didn't work for us because we are only doing client printing (our Rock server isn't on prem) so I think the out-of-the-box solution would have to be some kind of hybrid that takes both situations into account. Although, I think our solution would work with server-based printing almost as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants