Skip to content

BarTender Label Printing

What It Is

BarTender is label printing software made by Seagull Scientific. GateKeeper uses BarTender's REST API to print case labels at the Teasdale Carrollton site. When a new production job is imported, GateKeeper sends print requests to the BarTender server, which sends labels to the Zebra ZT411R label printer.

Which Sites Use It

  • Teasdale Carrollton (Line 7 and Line 9)

How It Works

  1. The TeasdaleImporter reads a JSON production data file.
  2. GateKeeper maps the production data fields to label fields.
  3. GateKeeper sends an HTTP POST request to the BarTender REST API.
  4. BarTender opens the label template (.btw file), fills in the data, and prints.
  5. The Zebra ZT411R printer prints the label with the case data.

Architecture

GateKeeper Application
    -> BartenderPrintClient (HTTP POST)
        -> BarTender REST API (http://server:5159)
            -> Zebra ZT411R Printer

Configuration

BarTender settings are in appsettings.json under BartenderSettings:

Setting What It Is Example
BartenderUrl URL of the BarTender REST API http://localhost:5159
DocumentFile Full path to the label template file on the BarTender server C:\gatekeeper\conveyor\data\Teasdale V2.btw
Printer Exact printer name as configured in Windows Zebra ZT411R (300 dpi)
SaveAfterPrint Whether to save the document after printing false

Important: The DocumentFile path must exist on the BarTender server, not the GateKeeper PC. If BarTender runs on the same PC, the path is local.

Label Data Fields

The following data from the production JSON file is printed on labels:

Label Field Source Description
GTIN ilmd.gtin Global Trade Item Number
LotNumber ilmd.lotNumber Production lot
PackDate ilmd.packagingDate Packaging date
BestBeforeDate ilmd.bestBeforeDate Best before date
ItemExpirationDate ilmd.itemExpirationDate Expiration date
SupplierName extension.mjx_suppliername Supplier name
WeightLB ilmd.netWeight.measurement Net weight
CountryOfOrigin ilmd.countryOfOrigin Country of origin
CasesPerPallet gateway.casesPerPallet Cases per pallet
JobId gateway.jobid Job identifier

Additional fields from the gateway section of the import JSON are automatically passed through to the label without requiring code changes. This allows new label fields to be added by simply including them in the import JSON file.

Common Problems and Solutions

Problem Symptoms Solution
Connection refused Print request fails, HTTP error in log Verify BarTender API server is running; check URL and port
HTTP error (non-200 status) Print fails with status code Check BarTender server logs for details
Printer not found BarTender reports printer error Verify exact printer name matches Windows printer name (including model details like "300 dpi")
Template not found BarTender reports file not found Verify DocumentFile path exists on the BarTender server; check file permissions
Labels printing with wrong data Fields incorrect on printed label Verify import JSON file content matches expected production data
Labels not printing at all No errors but nothing prints Check printer is online, has media (labels), and is not paused in Windows

If labels are stuck in the print queue:

  1. Open Devices and Printers on the BarTender server (or GateKeeper PC if same machine).
  2. Right-click the Zebra printer and select See what's printing.
  3. Check for stuck jobs. Right-click and Cancel if needed.
  4. If the queue is stuck, try Printer > Cancel All Documents.
  5. Restart the Windows Print Spooler service if needed:
  6. Open Services (services.msc)
  7. Find "Print Spooler"
  8. Right-click > Restart

Label Template

The label template is a .btw file created in BarTender Designer. It defines: - Label layout and dimensions - Named data sources that correspond to the fields GateKeeper sends - Barcode encodings (DataMatrix, UCC-128) - RFID encoding settings

Template changes should be made by someone familiar with BarTender Designer and coordinated with the GateKeeper configuration to ensure field names match.

Troubleshooting Steps

  1. Verify BarTender API is running: Try accessing the BarTender URL in a web browser on the server.
  2. Check network connectivity: Can the GateKeeper PC reach the BarTender server? Try pinging the server.
  3. Check the printer: Is it powered on, has labels loaded, and shows ready?
  4. Check the GateKeeper log: Look for HTTP errors or connection failures related to printing.
  5. Check BarTender server logs: BarTender has its own logs that may show template or printer errors.

When to Escalate

  • BarTender API consistently returns errors (server-side issue)
  • Label template needs modification (requires BarTender Designer expertise)
  • Printer hardware malfunction (paper jam, printhead issue)
  • Fields appearing on labels that do not match the import data