Print Views

A saved design published as a protected URL on print.zplcloud.com: end-user form, optional QR/barcode scanner, data lookup, PDF preview, printing to a Weblink printer. Every view is installable as its own PWA.

Model

A design can have several views with different forms, e.g. a store view (EAN → one product label) and a shipping view (order number → three labels). The end user opens the URL, fills the form, checks the PDF preview and prints. No designer access is needed.

URLs and access

  • Canonical: https://print.zplcloud.com/d/{designName}.{designId}/{viewSlug}
  • Short: https://print.zplcloud.com/pv/{id} → 302 to the canonical URL (for QR codes).
  • DHL-only views (no design): https://print.zplcloud.com/d/dhl/{slug} - see Integrations.
  • Access: login required; creator + accounts in allowedEmails; everyone else gets 403. Demo accounts cannot print.
https://print.zplcloud.com/d/australia-open-rfid.15/store
https://print.zplcloud.com/pv/7        # → /d/…

Creating a view

  1. Platform → Print Views (/platform/printviews).
  2. Select a saved design; set name and view ID (slug, a-z 0-9 -); description optional.
  3. Allowed accounts: e-mail addresses, one per line or separated by ;. The creator always has access.
  4. Form designer: add fields (dx-text-box, dx-select-box, dx-check-box, dx-button); per field label, binding name, placeholder, required, options, data source, lookup column, scanner on/off.
  5. Optional default printer (Weblink) and allowedPrinters.
  6. Save: both URLs with copy buttons plus a QR code of the URL as PNG/PDF/ZPL, printable to a Weblink printer (/api/barcode/generate, /api/render/zpl-pdf).

Form fields and data

FieldBehaviour
dx-text-boxText input; optional 📷 scanner button (camera → value into the field; camera choice remembered in localStorage; beep on success).
dx-select-boxDropdown with static options or a data source (100 test articles).
dx-check-boxBoolean flag.
dx-buttonTrigger (preview).
  • Lookup: the entered value (e.g. EAN) is matched against the lookup column; the matching row is merged into the record, all columns are available to the design as $bindings. Current data source: 100 deterministic test articles with EAN-13 checksum. DHL-only views use data hub datasources (SQL Server / MongoDB via CLI agent).
  • Validation: preview / PDF / print are enabled only when all required fields are valid; the server answers 400 (not 500) for missing or invalid data.
  • Clear form button resets all fields.

Scanner formats

ZXing-C++ (WASM, self-hosted under /pvlib/*) with the ZXing-JS port as fallback; no CDN. Own frame loop (canvas → luminance source → binarizer), TRY_HARDER, plus a centre zoom pass at native resolution for small codes (blue corner frame).

  • 1D: EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, Codabar, ITF, DataBar (RSS-14), DataBar Expanded
  • 2D: QR Code, Data Matrix, PDF417, Aztec, Micro QR

Preview and printing

  • Preview as PDF - renders the design with the form data (LabelRenderer).
  • Print PDF - browser print dialog of the preview.
  • Print via Weblink - POST …/print sends the ZPL to the selected Weblink printer; printers are listed de-duplicated by zebraPrinterId/name, the default printer is preselected. DHL-only views can also target CLI agent printers and watch folders.

PWA

RouteContent
/{view}/manifest.jsonname = view name, display: standalone, start_url = view URL, icons 192 / 512 px.
/{view}/icon.png?size=192|512Generated PNG with the view's initial (SkiaSharp; ZPLCloud / Liberation Sans / Droid fallback).
/sw.jsMinimal service worker: network passthrough, no caching of label or API data.
iOS metaapple-mobile-web-app-capable, apple-touch-icon → standalone without browser UI.

Android "Install app" / iOS "Add to Home Screen". Without a session the login page opens first, then the view. Layout is mobile-first: form and preview stack below 820 px.

Data routes (same origin, no CORS)

RouteFunction
GET /api/printviews/listViews in the user's scope.
POST /api/printviews/saveCreate / update (creator only).
POST /api/printviews/deleteDelete (creator only).
GET /api/printviews/{id}Detail incl. design JSON and test articles.
GET /api/printviews/testdataThe 100 test articles.
GET /api/weblink/connections · POST /api/weblink/send-zplWeblink printers (as in the batch tab).

Storage: table printviews; form JSON { version, fields[] }.

Host isolation

On print.zplcloud.com only these routes exist: /d/…, /pv/{id}, manifest.json, icon.png, /sw.js, /api/*, account/login pages and the login assets. Everything else (SPA, marketing) answers 404. Other hosts are unaffected.