zebra zpl printer language - how to tell printer to force cut - zpl

good day. is there a command to tell the printer to immediately cut the paper after printing a line of text ? even if the line of text is in the middle of the label.
I've tried ^MMT,N but that command will cut at the end of the label.

^MMC is for cut. MMT is for tear off.
But I am not sure if this is possible to cut just after line of text. In printer there can be a detector to find end of label (you can also try manipulate with force change length of label by manually changing its length)

Related

GREP for end of text symbol

I need to go through and join hundreds of separate text frames into a unified text thread. The problem is that when I link the frames the style of the first paragraph of the frame I'm linking to ofter changes to the style of the last paragraph in the text frame I'm linking from. If I could put a frame break into the end of every text frame I could avoid this problem. The hidden character for 'end of text' looks like a hashtag. Is there a GREP for this?
Just found on the Adobe forums that \z is the character I want, and it does find all the instances, but when I try to change them for page breaks I crash my programme. Every damn time.
You can't only search for a single location placeholder with InDesign's GREP (it has its wings clipped) – although it should not have made it crash. Change the Keep Settings for every first paragraph in your stories to start in a new frame, it'll have the same result when joining.
You can use GREP for this as well. Search for
\A.
and leave the Change To field blank. In the Change To formatting field, set your new Keep options. \A matches Start of Story, and the single . is so you actually can find a (any) character so it won't crash on you again.
So I did this in the end which achieved what I wanted:
Find: (.)(\z)
Change to: $1~R
This way when I linked the text frames the styles didn't get changed.
Thanks for everyone's help, esp. user1754036 for the link to InDesign Secrets which really solved the puzzle for me.

ZPL Programming - reset settings on each print job

Zebra ZPL label printers carry over the print commands from print job to print job. So if you send a ^FWR command that rotates a label, all future jobs will be rotated, so you have to reset the orientation to ^FWN if you want to have the next label be printed in portrait mode.
Is there a way to automatically reset the 'standard' settings on a Zebra on each print job? So settings from the previous job don't carry over to the next job? I want every zpl file I send to the printer to be printed exactly the same, regardless of what was printed prior.
Or is there a default set of commands that I can send that reset the orientation, fonts, position, dpi, measurements, etc?
There's a command that does a power-on/factory reset, but I don't want to do that on every label print.
You can manually reset all unwanted settings.
This works for me
^PON^LH0,0^FWN
.
FWN resets field orientation
LH resets the offset
PO resets print orientation
Not sure if all of those are needed and/or others would be needed for you too. In my particular case, I did not need FWN.
My printing got messed up when pasting some sample ZPL to the printer. Next 30 labels had orientation and offset changed making them unusable. So I just have above command in beginning of my labels now.
You might specifically have to reset other settings too.
If you can send ZPL Before or After a label you want to print, add the commands you want, like ^PO outside of the begin ^XA/end ^XZ label. It should change it until another similar command is set.

Zebra ZT410 ZPL Clear buffer command

The "~JA" command, as stated in ZPL Programming Guide vol.2, cancels all commands in the buffer.
We were using the ~JA at the start of every PRN file and it worked as intended on ZM400 and ZE500 models. The goal is to have only one printout in case multiple prints are triggered. So if I press "Print" 3 times, only the third label prints out.
I have tried:
- introducing the ~JA command through Zebra Designer interface
- introducing the ~JA manually in the PRN at the start of the PRN file as ~JA~; ~~JA~; ~JA
No luck. On the ZT410 nothing prints out, the printer just hangs there with the data led blinking.
Any ideas?
This is the kind of question that wants a higher level control at a lower level. If you only want 1 label to be printed after a button or print dialog is initiated, it needs to be done at a higher level than ZPL II. Sending a ~JA command typically just flushes the command buffer on a printer less than it does eliminate the ZPL that is being sent before it. In your case, you should eliminate the user's ability to hit the print button 3 times. Effectively adding a de bounce function to your higher level program. It is good however to send a flush command before sending the ZPL you want to print, in case a cached command for a label is stuck in the buffer for the printer. There have been instances where an old label will print out because I have neglected to send this command at the header of my ZPL generator.

zpl printer tear off issue

I am using zpl II script to print 3 x 2 labels. Its a ethernet printer.I am facing problem that after the print label not properly tear off. So the next print not properly printing.Is that any way in zpl script label is tear off properly adjest.
What is exactly your problem?
I can give you example of my zpl code:
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR5,5~SD15^LRN^CI0^MMT^PW295^LL0236^LS0^FT29,177^A0N,17,19^FH\^FD_text_^FS^XZ
If I want to tear off: I set MMT. If I want to cut, I'm changing this parameter to MMC.

Increase the height of Windows native edit control as the user is typing in text

We have a text box which is in fact an instance of the standard native Windows edit control used to enter text. The control was created using CreateWindowsEx without the ES_AUTOHSCROLL flag specified. It implies that word wrapping for entered text is used automatically.
Our goal is to fix the control's width and increase the height of the control automatically as the number of text lines is increased to show all them. An example: by default, the text box is empty. The user starts typing, and as soon as the end of the first line is reached, the text box automatically increases its height by one text line so the last word is put into the beginning of the second line due to word wrap.
How to gain this? Our development environment is VB6, but any WinAPI-based code is also welcome.

Resources