zplCore.comzplCore.com

ZplRescaler

public static class ZplRescaler

Converts raw ZPL between printer resolutions (e.g. a 203 dpi label for a 300 dpi printer): field origins, label size/home/shift, boxes/circles/lines, fonts (^A, ^CF), field blocks, ^BY module width and barcode heights, 2D module sizes (QR, DataMatrix, Aztec, PDF417 row height) and ^GF graphics (resampled, written as :Z64:).

Field data and unknown commands pass through unchanged. Module widths are integers on the printer, so 1D barcodes get the nearest whole module (min 1) — their total width can differ slightly from the exact ratio. Downloaded graphics (~DG/~DY) and binary ^GFB data are not resampled.

Try it online on zplCloud.com: ZPL DPI Converter

Methods

Method SignatureReturnsDescription
static # Rescale(string zpl, double factor)stringScales all dot values by factor.
static # Rescale(string zpl, int fromDpi, int toDpi)stringRescales ZPL from fromDpi to toDpi.