Print Views
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.
Creating a view
- Platform → Print Views (
/platform/printviews). - Select a saved design; set name and view ID (slug,
a-z 0-9 -); description optional. - Allowed accounts: e-mail addresses, one per line or separated by
;. The creator always has access. - 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.
- Optional default printer (Weblink) and
allowedPrinters. - 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
| Field | Behaviour |
|---|---|
| dx-text-box | Text input; optional 📷 scanner button (camera → value into the field; camera choice remembered in localStorage; beep on success). |
| dx-select-box | Dropdown with static options or a data source (100 test articles). |
| dx-check-box | Boolean flag. |
| dx-button | Trigger (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 …/printsends the ZPL to the selected Weblink printer; printers are listed de-duplicated byzebraPrinterId/name, the default printer is preselected. DHL-only views can also target CLI agent printers and watch folders.
PWA
| Route | Content |
|---|---|
| /{view}/manifest.json | name = view name, display: standalone, start_url = view URL, icons 192 / 512 px. |
| /{view}/icon.png?size=192|512 | Generated PNG with the view's initial (SkiaSharp; ZPLCloud / Liberation Sans / Droid fallback). |
| /sw.js | Minimal service worker: network passthrough, no caching of label or API data. |
| iOS meta | apple-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)
| Route | Function |
|---|---|
| GET /api/printviews/list | Views in the user's scope. |
| POST /api/printviews/save | Create / update (creator only). |
| POST /api/printviews/delete | Delete (creator only). |
| GET /api/printviews/{id} | Detail incl. design JSON and test articles. |
| GET /api/printviews/testdata | The 100 test articles. |
| GET /api/weblink/connections · POST /api/weblink/send-zpl | Weblink 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.