With latest release we added ZEBRA ZPL printing driver to support print to very popular mobile thermal printers.
Our driver support 3 modes for ZPL printing:
- Text (plain / ZPL) - SCS spool is converted into ZPL format by adding special vertical movement commands based on font size. Font itself is auto-detected or selected through mobile app. If spool contains ZPL commands, they will be used as is without adding ZPL instructions by the driver. Possible combinations are: plain text, only zpl escaped text , or zpl escaped text with ^XA ^XZ and plain text within the same spool .
- Raster (image) - SCS spool is converted to PDF and then to an image resized to fit to printed physical page width and finally to graphical ZPL data for printing.
- USERASCII (PDF) - Spools of type USERASCII might contain various formats. ZPL driver will use auto-sense technology to detect if data format is PDF. In any other case, data is ignored.
PDF document will be converted to an image, resized to fit to printed physical page width and then converted to graphical ZPL data for printing.
NOTE: To print to Zebra Thermal printer from mobile app PrintConnect application is required. Application is used for printer detection and linking into Android OS.
Configuration parameters - mobile
In mobile application under Printing preferences, one can find LPI, DPI, Font and Width which are very important parameters to get proper printouts.
- LPI - line spacing in dots - is blank space between printed liens (Text Plain only)
- DPI - printer density in dots/mm - valid values are 4, 8, 6, 12, 24 etc.
- Width - printer max. paper width in inches
- Font - ZPL font used for printing in format f,w, h where
* f - font 0..9 or A..Z
* w - width in dots
* h - height in dots
DPI and Printer Width are important and must be set exactly to printer specifications to get proper output. Otherwise, printed data might be off the margins.
Font - ZPL driver will use auto-detect mode to select proper font and size if font is not set or only font type is set without width and height. If Width and Height are set, ZPL will use those values for font sizing and vertical line movement. Selected font in format f,w,h (0,25,25) is applied to every printed spool.
ZPL printers support 2 types of fonts, scalable and fixed sized fonts. Fixed are of lower quality and might not support client code page while scalable fonts support wider range of codepages but missing equal width of characters. That creates issues with standard SPOOLs.
Solution is to use Zebra Tools to upload monospaced TrueType font to a printer and use that font as a replacement.
Another approach is to use raster mode which will create proper spool formatting and create graphical output. This approach will solve character encoding issues also.
Configuration parameters - server
ZPL printers might require some initial setup commands as printer reset, default font set or default margins. If ZPL printer has a custom loaded font, we can use initialization data to prepare font and default font size as shown in example below.
^XA ^CW0,R:MYFONT.FNT ^CF0,25,25 ^XZ
File default.zpl with initialization commands must be put inside [USER]/io.greenscreens/overrides folder.
We added support for various configurations for different spools, printers and environments.
Valid options in order of preference are: