Skip to main content

pplb 0.1.0 copy "pplb: ^0.1.0" to clipboard
pplb: ^0.1.0 copied to clipboard

Pure-Dart PPLB (Printer Programming Language B) command generator for ARGOX / EPL2-family label printers. Builds label byte streams; transport-agnostic.

pplb #

Pure-Dart PPLB (Printer Programming Language B) command generator for ARGOX / EPL2-family label printers. It builds the label byte stream; you send it over whatever transport you have. No FFI, no platform dependency — runs on every Dart target (server, CLI, Flutter desktop/mobile, web).

PPLB is ARGOX's command language, closely modeled on EPL2. This package emits raw PPLB bytes — it does not drive ZPL (Zebra), TSPL (TSC), or ESC/POS (Epson) printers. For a ready Windows USB transport, see argox_ix4.

Usage #

import 'dart:convert';
import 'package:pplb/pplb.dart';

void main() {
  final label = CommandLabel(const [
    BufferClear(),                                   // N
    LabelDimensions(length: 100, gap: 20),           // Q
    Text(x: 50, y: 30, font: 3, data: 'PPLB'),       // A
    Barcode1d(x: 50, y: 80, type: '1', height: 60,   // B (Code128)
        data: '0123456789'),
    Barcode2d.qr(x: 50, y: 150, data: 'https://x'),  // b (QR)
    Copies(1),                                       // P
  ]);

  final bytes = label.bytes();          // send these over your transport
  print(ascii.decode(bytes));
}

Flutter consumers: this library exports a class named Text (the PPLB A command), which clashes with package:flutter/material.dart. Import with a prefix: import 'package:pplb/pplb.dart' as pplb;

What's included #

  • Commands: Text (A), Barcode1d (B), Barcode2d.qr (b), Box (X), Line (LO), LabelDimensions (Q), LabelWidth (q), Origin (R), PrintSpeed (S), Darkness (D), PrintDirection (Z), BufferClear (N), Copies (P), ImmediateStatus (^ee), Enable/DisableErrorReport (US/UN).
  • Label / CommandLabel — compose commands into one program.
  • PrinterStatus with PplbStatus (maps ^ee codes: 07/50 → media-out, 11 → head-open, 12 → paused) and SafeStatus (never throws across the seam). pplbStatusCode parses a raw ^ee reply.
  • Printer seam (transport contract) with LoggedPrinter / RetryPrinter decorators and a ConstPrinter fake for tests.

License #

MIT — see LICENSE.

0
likes
0
points
15
downloads

Publisher

verified publisherlarryhsiao.com

Weekly Downloads

Pure-Dart PPLB (Printer Programming Language B) command generator for ARGOX / EPL2-family label printers. Builds label byte streams; transport-agnostic.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on pplb