Warm tip: This article is reproduced from serverfault.com, please click

How to modify a packet before it is sent to a printer?

发布于 2020-12-07 18:16:25

I am using old (3 years) label software automatically print barcodes on a production line to a Zebra printer. I just realized and confirmed with their IT that this software, for whatever reason when a print job is triggered, it sends a ^PR6 to the printer, setting the print speed to 6 (and overwriting the 2 I have set). No amount of tooling around with the printers settings or properties we changed were able to override this. IT also told me this product is at end of life and likely no one there will make a patch on it.

It seems like my only solution is to somehow catch this packet before it goes from the server to the printer and remove this ^PR6 from the beginning of the packet so that the print job uses the printers settings. Is there a way that I can do this?

This is all on a Windows Server 2012 system.

Questioner
bjk116
Viewed
0
banno 2020-12-08 03:08:37

Newer printers have a command override command. Send the following command to the printer that you want to ignore the ^PR6:

! U1 setvar "device.command_override.add" "^PR"

More information can be found in the ZPL manual: https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf