PrintBase
  • Product
  • Pricing
  • Docs
  • Resources
PrintBase/Guides/Printing use cases

Industrial barcode label printing on a production line

A scan on the line can submit a ZPL or TSPL label to the printer at that station. The API does not talk to the PLC.

For Manufacturing lines that label a unit when it is scanned

Overview

The line event is a serial number or a work order step. Your MES or the small service beside it renders ZPL or TSPL and posts it to the station printer. The PLC and the printer are not required to share a protocol.

Keep dpi and label size in the station record. A 600 dpi industrial head will shrink a 203 dpi layout. Test one label at shift start.

Use the serial number as the idempotency key so a double scan does not apply two labels to two different units... unless your process wants a reprint, in which case the key includes a reprint counter.

Integration steps

  1. 01

    Decide the printer before the click

    Map the station, store, or line to a printer_code from GET /v1/printers. Do not ask the operator to pick a dialog.

  2. 02

    Create the document in your system

    PDF for driver printers, raw ZPL or ESC/POS when the device speaks that language.

  3. 03

    POST when the business event happens

    Pack, pay, check-in, or scan. Not on every autosave. Use the business id as Idempotency-Key.

  4. 04

    Show the job result where the work is

    queued is not done. Surface AGENT_OFFLINE and PRINT_ERROR to the person at the bench.

Node.js

// Line label
const res = await fetch('https://api.printbase.cloud/v1/print-jobs', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PRINTBASE_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': idempotencyKey,
  },
  body: JSON.stringify({
    printer_code: Number(process.env.PRINTER_CODE),
    content_type: 'raw',
    content: Buffer.from(payload).toString('base64'),
    copies: 1,
  }),
});
if (!res.ok) throw new Error(`PrintBase ${res.status}: ${await res.text()}`);
const job = await res.json();
// { id: "job_abc", status: "queued" }

Details for this setup

Double scan

Decide the rule explicitly. The default key suppresses a second job. The agent prints only what you send; it does not fetch the document from the platform for you.

Raw language

Zebra lines want ZPL. Many TSC lines want TSPL. Do not share one template. The agent prints only what you send; it does not fetch the document from the platform for you.

Questions

Does PrintBase talk Modbus or OPC?

No. Your MES calls the HTTP API. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.

QR codes? in this setup

Put ^BQ or the TSPL QR command in the payload. The API does not draw it.

Label applied by a machine?

You still send bytes to the printer queue. Applicator timing is outside this API.

Audit? in this setup

Store the job id next to the serial in the MES. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.

Related guides

  • Print barcode labels on a TSC TE200

    The TE200 is a TSC desktop barcode printer, commonly TSPL at 203 dpi. Send TSPL as raw, or PDF through the driver.

  • Print industrial ZPL to a Zebra ZT410

    Send ZPL to a ZT410 on the packing line. The head may be 203, 300, or 600 dpi. Size the label for the head you installed.

  • Print a label when a 3PL order is packed

    At a packing station, the scan that closes the carton should submit the label. No dialog, one printer_code for that bench.

  • How to auto-print barcode labels from Google Sheets

    Use Apps Script to send barcode labels from a sheet to a printer. No Sheets add-on is included; UrlFetchApp calls the API.

Free plan: 100 jobs a month on one computer, no card.

Create a free accountRead the API docs
PrintBase

PrintBase connects your applications to physical printers anywhere - securely, reliably, and in real time.

Product
Receipt PrintingLabel PrintingDashboardDevicesWebhooks
Resources
DocsBlogStatusAPI ReferenceDownloadPrintBase vs PrintNodePrintNode PricingFAQ
Guides
All guidesIntegrationsPrintersCode samplesComparisonsUse casesTroubleshooting
Company
ContactSecurityPrivacy

© 2026 Aveniq Technologies OÜ. All rights reserved. PrintBase is a service of Aveniq Technologies OÜ.

PrivacyTermsRefunds