Nicht mit anderen Aktionen kombinierbar.
A label rebuilt from a photo, on my thermal label printer.
I photographed a thermal-printed coupon and asked Claude to rebuild it as a label template for my 4×6 inch label printer. Now every coupon with another name, discount and code prints with a QR code that scans.
BYSEBASTIAN KLEINBUILDS PRINTERCOW
Nicht mit anderen Aktionen kombinierbar.
What I use.
Labels are where a printer's own commands fall short. My label printer prints only plain ASCII from its built-in fonts: an umlaut cuts a line short, and a logo is out of the question. I wanted to know whether an AI could take a photo of a real label and turn it into something I can print again with other values.
- PRINTER
- MUNBYN ITPP130B thermal label printer, TSPL (USB 5958:0130)
- LABELS
- 100 × 150 mm (4 × 6 inch) direct thermal labels
- DONGLE
- Printercow, powered by a USB-C phone charger
- AI
- Claude, with the Printercow MCP server
- RECIPE
- One, approved once on the dashboard: the label size, calibration and framing commands
What I did.
- 01
Teach Printercow the printer, once
Unlike a receipt printer, a label printer needs a recipe. Claude explored the printer over raw USB: it found that it speaks TSPL, that its fonts print ASCII only, and the calibration for my labels (direction, reference and shift). It proposed a recipe that frames a drawn label with the size, gap and print commands. I approved it on the dashboard.
- 02
Give Claude the photo
The photo goes into the asset library on the dashboard. Claude cannot see a file from a chat, but it reads assets through Printercow, including the QR code on them.
- 03
Ask for the label as a template
I asked Claude to rebuild the coupon and to turn whatever changes from coupon to coupon into a parameter.
Claude read the photo, decoded the QR code, drew the layout with its shapes, text, QR code and the serial number running up the edge, and compared its previews with the photo until they matched. It saved the label as a template with six parameters: name, discount, code, valid-until date, shop URL and serial number.
- 04
Say yes once
The first full-size label on a printer prints its top strip first, and Printercow asks on the dongle page whether it sits cleanly on the label. After one yes it prints whole, and so does every later label of that size on that printer.
- 05
Print new coupons
Now a coupon is one call: Claude prints it with new values, the Templates page prints it from a form with a live preview, and my code prints it over REST.
The QR code scans from a phone, the umlauts are umlauts, and the layout looks very close to the original.
A coupon from code.
The same print job call as for a receipt: only the template and its values change. "Use from code" on the template's page shows its exact parameters.
The API reference lists every call, its fields and its answers.
1 curl -X POST https://milk.printercow.com/api/v1/print-jobs \ 2 -H "Authorization: Bearer $PRINTERCOW_TOKEN" \ 3 -H "Idempotency-Key: coupon-0815" \ 4 -H "Content-Type: application/json" \ 5 -d '{"dongleId": "dev_...", "template": "<coupon template>", "params": { ... }}'
What I learned.
- Do not fight the printer's fonts. Cheap TSPL label printers often print ASCII only; Printercow draws the whole label on the server, so umlauts, € and logos print anyway.
- A label printer needs one approved recipe for its size and calibration. After that, any layout and any template prints through it.
- Put the photo in the asset library. The AI reads it there, codes included, and a decoded QR code becomes a parameter instead of a guess.
- QR codes and barcodes drawn at 203 dpi scan from a phone, as long as the modules are a few dots wide.