1C-Bitrix Integration with Zebra Label Printers

1C-Bitrix Integration with Zebra Label Printers A powerful Zebra label printer is only as effective as its integration. Without proper automation, operators manually copy data from Bitrix to Excel and print via ZDesigner. This is slow and error-prone – barcodes get mixed up, prices become outdate

Our competencies:

Frequently Asked Questions

העבודות האחרונות

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1442
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    1013
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    752
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    873
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    794
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    1154

1C-Bitrix Integration with Zebra Label Printers

A powerful Zebra label printer is only as effective as its integration. Without proper automation, operators manually copy data from Bitrix to Excel and print via ZDesigner. This is slow and error-prone – barcodes get mixed up, prices become outdated. Our team of certified Bitrix developers with 10+ years experience and over 40 successful projects automates label printing directly from your site. When price changes, goods arrive, or shipments occur, labels are generated and sent to the Zebra printer without human intervention. We use ZPL – the industrial printer control language – over TCP/IP RAW (port 9100). This reduces labeling errors by 95% and cuts costs by up to 40% compared to manual processes. For a warehouse processing 1,000 labels daily, this saves approximately $15,000 per year in labor costs.

Problems We Solve

Manual data transfer causes errors

Operators copy product data from Bitrix to Excel, then to ZDesigner. This introduces typos, outdated prices, and mismatched barcodes. With our integration, data flows directly from your Bitrix database to the printer via ZPL. Our solution prints labels 5 times faster than manual methods.

No event-driven printing

Without automation, printing requires manual action for each price change or goods receipt. We attach handlers to Bitrix events like OnProductUpdate and document processing, so labels print automatically.

Queue management and retries

If a printer is offline or busy, direct printing fails. Our print queue stores pending jobs and retries – up to 5 attempts – with admin notifications on failure.

How We Do It (Technical Deep Dive)

Our integration uses ZPL, the native language for Zebra printers. We send raw ZPL over TCP/IP port 9100. Here's the core function:

function printZpl(string $printerIp, int $printerPort, string $zpl): bool { $socket = fsockopen($printerIp, $printerPort, $errno, $errstr, 5); if (!$socket) { \Bitrix\Main\Diag\Debug::writeToFile("Zebra: $errstr ($errno)", '', '/bitrix/zebra_errors.log'); return false; } fwrite($socket, $zpl); fclose($socket); return true; } 

For Windows shared printers, we provide an alternative via a local agent (Python/Node.js) that receives HTTP requests from Bitrix and sends to the printer through WinSpool.

Label Generation

We generate product labels using a dedicated class ZebraLabelGenerator:

class ZebraLabelGenerator { public function generatePriceLabel(array $product, string $priceType = 'BASE'): string { $price = \CCatalogProduct::GetOptimalPrice($product['ID'])['PRICE']['PRICE'] ?? 0; $barcode = $this->getBarcode($product['ID']); $name = mb_substr($product['NAME'], 0, 30); return implode("\n", [ '^XA', '^CI28', '^PW464', '^LL200', '^FO20,10^A0N,24,24^FD' . $name . '^FS', '^FO20,40^A0N,18,18^FD' . ($product['PROPERTY_ARTICLE_VALUE'] ?? '') . '^FS', '^FO20,65^A0N,36,36^FD' . number_format($price, 2, '.', ' ') . ' RUB^FS', '^FO20,110^BY2^BCN,50,Y,N,N^FD' . $barcode . '^FS', '^XZ', ]); } private function getBarcode(int $productId): string { $row = \Bitrix\Catalog\ProductBarcodeTable::getList([ 'filter' => ['PRODUCT_ID' => $productId], 'limit' => 1, ])->fetch(); return $row['BARCODE'] ?? str_pad($productId, 12, '0', STR_PAD_LEFT); } } 

Template System

We store label templates in a database table (bl_zebra_templates) instead of code. This allows layout changes without redeployment. Placeholders like {{NAME}}, {{PRICE}}, {{BARCODE}} are replaced by a ZebraTemplateEngine class.

Event-Driven Printing

On price change, we hook into OnProductUpdate event:

AddEventHandler('catalog', 'OnProductUpdate', function($productId) { $needPrint = \Bitrix\Main\Config\Option::get('zebra_module', 'auto_print_price_change', 'N'); if ($needPrint !== 'Y') return; $product = \CIBlockElement::GetByID($productId)->GetNext(); $printerIp = \Bitrix\Main\Config\Option::get('zebra_module', 'default_printer_ip'); $zpl = (new ZebraLabelGenerator())->generatePriceLabel($product); ZebraPrinter::send($printerIp, 9100, $zpl); }); 

For goods receipt, after processing the incoming document, we create a print job queue:

foreach ($receiptItems as $item) { for ($i = 0; $i < $item['qty']; $i++) { $jobs[] = [ 'product_id' => $item['product_id'], 'copies' => 1, 'template' => 'warehouse_label', 'printer_id' => $item['warehouse_printer_id'], ]; } } ZebraPrintQueue::push($jobs); 

Print Queue with Retries

The queue table bl_zebra_print_queue is processed by an agent every minute for reliability:

CREATE TABLE bl_zebra_print_queue ( id SERIAL PRIMARY KEY, printer_id INT NOT NULL, template_id INT NOT NULL, data_json JSONB NOT NULL, status VARCHAR(20) DEFAULT 'pending', attempts SMALLINT DEFAULT 0, scheduled_at TIMESTAMP DEFAULT NOW(), printed_at TIMESTAMP ); 

On failure, status becomes retry and attempts increment. After 5 failed attempts, status is failed and admin gets notified.

Why Zebra is the Standard for Warehouse

Zebra printers use thermal printing – no cartridges, no smudging. ZPL allows flexible layouts with logos, variable fields, barcodes (EAN-13, Code 128, QR). The built-in queue guarantees no lost labels even during network glitches.

Our lead developer: "The ZPL protocol is so flexible that you can print any label content without changing the code."

Process of Work and Evaluation

We don't offer fixed prices – cost is determined after analysis. Our standard process:

  1. Data collection – we gather your current workflow, printer models, and label requirements.
  2. Audit and analysis – we review your Bitrix setup, event handlers, and 1C exchange settings.
  3. Design – we create ZPL templates for up to 5 label types.
  4. Estimation – we provide a detailed quote. Typical projects start at $2,500, and clients typically see ROI within 3–6 months.
  5. Development – we build the module, queue, and administrative interface.
  6. Testing – we test with your actual printer and simulate events.
  7. Deployment – we deploy to production and train operators (2 hours online).

Timeline Estimates

Stage Duration
ZPL sending class 1 day
Template generator with placeholders 2 days
Print queue + agent 1 day
Event handlers (price change, receipt) 2 days
Admin interface for printer management 2 days
Testing with real printer 1 day
Total 9–11 days

Typical Issues and Solutions

Issue Solution
Printer doesn't respond over TCP Check port 9100, firewall, dedicated IP
Cyrillic characters garbled Ensure printer supports UTF-8 (Zebra GC420t and above)
Connection drops with large queue Enable retries (up to 5) and admin notifications

What's Included in the Work

Component Description
Integration module development ZPL sending classes, label generator, print queue
Label template setup Up to 5 standard layouts (price, warehouse, shipping)
Printer connection 1–5 devices via TCP/IP or Windows agent
1C integration Automatic data synchronization via CommerceML
Operator training 2-hour online demo
Documentation Full technical documentation
Warranty 6 months on the module, bug fixes included

How 1C Integration Simplifies Printing

The 1C-Bitrix pair via CommerceML eliminates data duplication. Products, prices, and stock sync automatically. When a price changes in 1C, the data updates in Bitrix and triggers label printing – no manual intervention.

Get a consultation on integration – we'll assess your project in one hour. Contact us to discuss your warehouse automation details.