TE244 print helper — unique Chrome/Edge solution
================================================

Browsers disagree on portrait/landscape. This helper ignores the browser
print dialog completely.

How it works
1. Staff click Print now in the website (Chrome or Edge — same).
2. Website stores a raw TSPL job in the database.
3. This helper (on the printer PC) downloads the job and sends it to TE244.

Setup (printer PC, once)
------------------------
A) Windows driver stock (required)
   Control Panel → Devices and Printers → TSC TE244 → Printing Preferences
   Width:  78 mm
   Height: 25 mm
   Gap:    3 mm
   Sensor: Gap

B) Calibrate the printer (required — fixes skipping / misalignment)
   Official button method (TSC desktop / TE series):
   1. Load Victory Chromo 38×25 (2-across) roll correctly; guides snug to width
   2. Switch the printer OFF
   3. Press and HOLD the FEED button
   4. While still holding FEED, switch the printer ON
   5. Keep holding — printer feeds 2–3 labels, then stops and beeps
   6. Release FEED
   7. Press FEED once to confirm one clean label advance

   Also available: TSC Diagnostic Tool → Printer Configuration → Calibration
   (see https://buytscprinters.com/blogs/news/how-to-calibrate-tsc-barcode-printer-fix-skipping-labels-india )

   Recalibrate whenever you change roll, label size, or see skipping/cutoff.

C) Share printer
   Printer properties → Sharing → share name: TSC

D) Helper
   1. Copy this folder to the PC (e.g. C:\tsc-print-helper)
   2. Edit station.ini:
        ERP_URL=https://YOUR-SITE/.../public/index.php
        PRINT_KEY=same as config.php print_station.key
        PRINTER_SHARE=TSC
   3. Double-click start-helper.bat and leave it running
   4. On the website click Print now (or Print flipped if upside-down)

config.php on server must include:
  'print_station' => [ 'key' => 'dev123', 'share' => 'TSC' ],

If calibration still fails
- Clean gap sensor (IPA), check sensor under the gap
- Confirm sensor type is Gap (not Black Mark) for standard labels
- Confirm driver Width/Height match physical stock (78×25 for 2-up)
