Solved

Send ZPL clear memory command from Word label

Posted on 2012-03-29
4
3,384 Views
Last Modified: 2012-04-26
Hi.  I have a zebra GX420D desktop thermal printer.  I send a label print to this printer from MS word.  Problem is that the buffer does not clear so new print data sent to the zebra from word overlays on top of the previous data.  I can send a erset command from prniter driver software but wuold liek to add it to my label either at end of each print or start of new print.

How would I add reset command to my word label?
0
Comment
Question by:valmatic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 38

Expert Comment

by:hdhondt
ID: 37786310
As far as I am aware there is no way to do it from Word.

One possibility would be to create a macro which first downloads a file with the reset command to the printer, and then prints from Word. You could use something like AutoHotKey to create the macro.

Sending the command file is easy if the printer has a parallel or serial i/f. A simple DOS COPY will do the trick. If the printer is network attached, you'll need to use LPR. For a USB printer, your best bet is to share it, and map it to LPT1 using the NET USE command. Then you can use DOS COPY again.

This gets more complicated if you print multiple labels: in that case the macro will have to print each label individually, interspersed with rest commands.
0
 
LVL 7

Author Comment

by:valmatic
ID: 37787374
Hi HD,

printer is network attached and we print one label print job at a time.   What is the reset command?  

Isn't there a setting on the printer where I can say clear buffer after each print or print request?
0
 
LVL 38

Accepted Solution

by:
hdhondt earned 250 total points
ID: 37790570
According to the ZPL Programming Guide, the reset command is "~JR" (without the quotes). If you put that in a file you can send it to the printer with the command

LPR -S printer_IP_address -P ZPL file_name

I could not find a command in the manual to clear the input buffer.

However, I have another problem with all of this. It is quite possible that the driver sets up the printer in a certain way before it sends any printing data. If you then reset the printer after the first label, that setup is lost and subsequent labels may not print correctly, if at all. You would need a Zebra expert to tell you what can or can't be done in the middle of a driver printstream.

Of course, you can always try it...
0
 
LVL 7

Author Comment

by:valmatic
ID: 37796234
I'm using the ZDesigner driver.  Failed to mention.  I've had this printer in production for a little over a year and have not seen this issue before.  I also print labels to it from a program call on our IBM AS400.  Made a change to that program call and this issue with Word started up.  I can clear the buffer after printing AS400 labels but still does nothing for my word labels if I print from word back-to-back.    Called Zebra and they recommended a firmware upgrade.  Will try that and post results.  

If nothing else, maybe I can set my user up with a macro as you suggested to send the reset after each print.  A pain but quicker than a printer reboot...thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you ever need to create a 20 page Word document for some testing purpose? Are you tired of copying & pasting old boring "lorem ipsum" text over and over again, increasing font size and line space in order to make the document 20+ pages long? Look…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question