'How to change the dpi from 200 to 300 through ZPL

How to change the dpi from 200 to 300 through ZPL?

I want to use the same ZPL code on printers S4M (200 dpi) and ZT230 (300 dpi).



Solution 1:[1]

The ^MU command sets the units of measurement the printer uses. ^MU works on a field-by-field basis. Once the mode of units is set, it carries over from field to field until a new mode of units is entered. ^MU also allows for printing at lower resolutions — 600 dpi printers are capable of printing at 300, 200, and 150 dpi; 300 dpi printers are capable of printing at 150 dpi.

Solution 2:[2]

For c# users: isatufan made a ZPL-Handler which scales all properties of the ZPL by a given factor:

https://gist.github.com/isatufan/e22dc07ac7968fcb8e9a6046fa15f57a

Not all ZPL-Commands are handled but it is easy to add the missing commands.

Solution 3:[3]

According to the original ZPL bible the coversion can be done to lower.

I keep all my labels in 300, because most of the printers are 300 here, and those where app detects lower res printers it adds this line:

^MUd,200,300

https://www.zebra.com/content/dam/zebra/manuals/printers/common/programming/zpl-zbi2-pm-en.pdf

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Brian
Solution 2
Solution 3 Péter Bancsó