82label

Docs › Printing

Print calibration

Measure a printer's offset and scale once; it applies to every print after that.

Printers grab paper differently, so the same template can land 1 or 2 mm off. On the calibration page, measure one test print with a ruler and save X and Y (0.1 mm steps) and a scale (%).

  • The test print has a border, edge ticks every 1 cm, a centre cross and the size.
  • Too far right: negative X. Too low: negative Y. If 10 cm prints as 9.8 cm, scale 102%.
  • Saved in this browser per path: one for browser printing, one per printer with the print agent.
  • Applies to bulk printing, designer printing and print() on your own site (same browser, same site address).

In code

import { print, calibrationKey, getCalibration, setCalibration, calibrationTemplate } from '@82label/core';

setCalibration(calibrationKey('agent', 'TSC TE210'), { offsetX: -1.2, offsetY: 0.5, scale: 1.01 });
await print(t, rows);                                            // saved calibration applied
await print(t, rows, { calibration: { offsetX: 0.8 } });         // this value, this time
await print(t, rows, { calibration: false });                    // no calibration
await print(calibrationTemplate(t));                             // test print