A universal thermal label printing bridge. One binary, any printer, any platform.
TSC Bridge connects web applications to thermal label printers through a local
HTTP API. It runs as a system tray application, receives print jobs over
localhost, and sends them to the printer using the appropriate label language
(TSPL, ZPL, EPL, and more through community drivers).
Releases | Documentation | Contributing
- Features
- Install
- Quick Start
- How It Works
- API Reference
- Label Format
- Drivers
- Documentation
- Building from Source
- Contributing
- License
- Single binary -- no runtime, no installer, no database
- Cross-platform -- macOS (arm64), Windows (amd64, i386), Linux (amd64)
- Native UI -- system tray icon with embedded dashboard window
- HTTP API -- plain JSON over localhost, CORS-aware
- Label designer -- interactive drag-and-drop editor in the dashboard
- Batch printing -- import Excel/CSV, map columns to fields, print hundreds
- PDF output -- vector PDF generation with TrueType fonts
- Driver architecture -- extensible support for multiple printer brands
- QR and barcodes -- Code 128, Code 39, EAN-13, UPC-A, QR codes, vCards
- Auto-DPI detection -- reads printer capabilities on macOS and Windows
- USB direct printing -- bypasses the OS print spooler via libusb
- TLS on localhost -- self-signed certificate for HTTPS origins
- Whitelabel -- custom branding (name, logo, colors) per deployment
Download the DMG from the releases page, open it, and drag TSC Bridge.app to your Applications folder.
Or install the raw binary:
curl -fsSL https://github.com/nicoyarce/tsc-bridge/releases/latest/download/tsc-bridge-mac -o /usr/local/bin/tsc-bridge
chmod +x /usr/local/bin/tsc-bridgeDownload tsc-bridge-win-<version>.zip from the releases page. Extract and run
install_windows.bat as administrator, or compile tsc-bridge.iss with
InnoSetup for a GUI installer.
curl -fsSL https://github.com/nicoyarce/tsc-bridge/releases/latest/download/tsc-bridge-linux-amd64 -o /usr/local/bin/tsc-bridge
chmod +x /usr/local/bin/tsc-bridgeOn Linux, you may need to add your user to the lp group for USB printer
access:
sudo usermod -aG lp $USER- Start the bridge:
tsc-bridge-
The system tray icon appears. Click it and select Dashboard to open the native window.
-
Send a print job from your web application:
curl -X POST http://127.0.0.1:9638/print \
-H "Content-Type: application/json" \
-d '{
"printer": "TSC_TDP-244_Plus",
"data": "SIZE 50 mm, 30 mm\nGAP 3 mm, 0 mm\nCLS\nTEXT 10,10,\"3\",0,1,1,\"Hello World\"\nPRINT 1,1\n"
}'graph TD
A[Web Application] -->|HTTP POST JSON| B[TSC Bridge]
B --> C[HTTP Server]
B --> D[Label Renderer]
B --> E[Driver Layer]
D -->|PDF / TSPL / ZPL / EPL| E
E -->|USB / CUPS / Win32 RAW| F[Thermal Printer]
The bridge runs on 127.0.0.1:9638 (configurable). Web applications send
label data as JSON. The bridge renders the label using the appropriate driver
and sends the raw commands to the printer.
All endpoints accept and return JSON. The base URL is http://127.0.0.1:9638.
Returns bridge status, connected printers, and version.
Lists all detected printers with type, status, and capabilities.
Sends a raw print job. Body: { "printer": "name", "data": "TSPL commands" }.
Generates a multi-page PDF from a template and row data. Body:
{ "template_id": "uuid", "rows": [...], "mapping": {...} }.
Query parameter ?mode=url returns a download URL instead of the binary file.
Generates TSPL commands from a template and prints them. Body:
{ "template_id": "uuid", "rows": [...], "printer": "name" }.
Modes: print (default), preview (returns TSPL text), raster (bitmap).
Serves the embedded HTML dashboard.
Serves generated files (PDF, images). Add ?dl=1 to force download.
For the complete API reference, see docs/API.md.
TSC Bridge uses a JSON-based label format inspired by pdfme. The format describes page dimensions, field positions, types, and variable bindings.
{
"basePdf": { "width": 50, "height": 30 },
"schemas": [
[
{
"name": "product_name",
"type": "text",
"position": { "x": 5, "y": 5 },
"width": 40,
"height": 8,
"fontSize": 12,
"fontName": "Helvetica"
},
{
"name": "barcode",
"type": "barcodes128",
"position": { "x": 5, "y": 15 },
"width": 40,
"height": 10
}
]
]
}Field types: text, multiVariableText, qrcode, barcodes128,
barcodes39, image, line, rectangle.
For the complete specification, see docs/LABEL_STANDARD.md.
TSC Bridge uses a driver architecture to support multiple printer brands and label languages. Each driver translates the universal label format into printer-specific commands.
| Driver | Language | Printers |
|---|---|---|
| TSPL | TSPL2 | TSC TDP-244, TTP-245, TE200, TE300 series |
| PDF 1.4 | Any printer via OS print dialog |
| Driver | Language | Printers | Status |
|---|---|---|---|
| ZPL | ZPL II | Zebra ZD, ZT, GK, GX series | Seeking contributors |
| EPL | EPL2 | Zebra LP, TLP legacy series | Seeking contributors |
| CPCL | CPCL | Zebra mobile printers | Seeking contributors |
| ESC/POS | ESC/POS | Epson, Star, Bixolon receipt printers | Seeking contributors |
| DPL | DPL | Datamax-O'Neil / Honeywell | Seeking contributors |
| SBPL | SBPL | SATO printers | Seeking contributors |
| Fingerprint | Fingerprint | Intermec / Honeywell | Seeking contributors |
To write a new driver, see docs/DRIVERS.md.
- Architecture -- system design and component overview
- Goals -- project priorities and non-goals
- Label Standard -- label format specification
- Driver Guide -- how to write a printer driver
- API Reference -- complete HTTP API documentation
- Changelog -- version history
- Contributing -- how to contribute
- Security -- vulnerability reporting
- Code of Conduct -- community guidelines
- Go 1.21 or later
- CGO enabled (required for system tray and USB)
- macOS: Xcode Command Line Tools,
brew install libusb - Windows: MinGW-w64
- Linux:
apt install libusb-1.0-0-dev libgtk-3-dev libappindicator3-dev
git clone https://github.com/nicoyarce/tsc-bridge.git
cd tsc-bridge
# macOS
make build-mac
# Windows (from Windows or with MinGW cross-compiler)
make build-windows
# Linux
go build -o tsc-bridge .go test ./...The build.sh script builds all platforms, generates icons, creates the macOS
.app bundle and DMG, and packages the Windows installer:
./build.shContributions are welcome. See CONTRIBUTING.md for guidelines. The most impactful way to contribute is by writing a driver for a printer brand you have access to.