Print feature demos
Printing scenarios organised around the real capabilities of Litchio Print Assistant. Every print job completes silently on your machine — no windows, no interruptions. Supports both local printing and remote printing, with jobs queuing automatically when the network drops and flushing on recovery. Every category is directly callable — below are the commands for each scenario.
Every capability lives on your own PC
Print jobs complete silently on your machine — no windows, no interruptions. Files are not uploaded back and forth, and no remote layout service waits in line.
- Common formats print directly, layout intact
- Fill a template with data and the waybill comes out; QR codes generate locally
- No lost jobs when the network drops; automatic catch-up on recovery
How to call
The clientships no JS wrapper — only three real dispatch channels: REST /api/command (general), the convenience endpoints, native WebSocket /ws, plus the AO outbound long connection. Commands are "command name + JSON parameters"; without a command name it falls back to auto automatic detection.
// REST(通用命令端点)
POST /api/command
{ "cmd": "TemplatePrint",
"html": "收件人:{{name}}", "data": {"name":"李"}, "printer":"HP LaserJet Pro M404" }
// WebSocket(同端口 /ws,消息体同结构)
ws://127.0.0.1:19861/ws → 发送上面的 JSON → 返回 Result JSON
// AO 远程(终端出站长连接到云端中继,按 devId 路由) Scenario list
Common printing scenarios boil down to the 6 categories below, each with its real commands and capabilities.
Network files & multi-format printing
Key capability: print download links directly, with automatic file-type detection.
-
PrintFilePOST /api/command {"target":"https://files.example.com/report.pdf"}Print download links directly, with file type detected by extension and byte signature (PDF/Office/images/text/XPS/SVG/OFD)
-
AutoPrint/api/command without cmdAutomatically recognises network files, local files and inline content, then handles each by category
-
PrintPdfPOST /api/command {"target":"C:\\a.pdf","printer":"HP 5200"}Output straight to PDF on the chosen printer, layout intact
-
Images & textPOST /api/command target=图片或文本Laid out and drawn by the client itself, with orientation, scaling, paper and margins under your control
Waybill / label templates
Paper, barcodes, text boxes and document-style templates.
-
TemplatePrintPOST /api/command {\"html\":\"<div>Recipient: {{name}}</div>\",\"value\":{\"name\":\"Li\"}}HTML template plus JSON data filling template variables, with custom sizes such as 100×150
-
Template QR codesGenerated locally inside the template, no internet neededQR codes are generated locally by the client, with no external service
-
PrintBarcodePOST /api/command {"value":"123456","format":"code128"}Print 1D/2D barcodes directly
ESC/POS thermal
Send raw printer commands or read/write the port directly.
-
PrintEscPosPOST /api/command {\"printer\":\"POSTEK2108\",\"text\":\"Receipt\"}Raw commands print thermal receipts and labels directly, barcodes and QR codes included
-
Network receipt printersprinter accepts host:port (TCP 9100)Raw commands bypass the system print queue — ideal for dedicated ticket printers
AO remote / WAN printing
Remote printing: jobs are dispatched to the target device, with offline catch-up when the network drops (a channel capability, not a command name).
-
AO remote channelTerminals connect outbound to the relayDevices register and receive routed jobs; when the link drops jobs queue locally and flush on recovery
-
Offline catch-upPaper keeps coming out while the external link is downJobs enter the local queue first, and the client catches up once the link returns
Virtual printing & documents
Output to PDF/XPS files, self-check drivers and read system information.
-
PrintToPdf / PrintToXpsPrint to PDF / XPS filesConverted to printable documents first, layout intact
-
CheckPrinterDriverPrinter & driver self-checkRead-only listing of printers, driver names and availability — nothing is installed
-
GetPrinterList / SetDefaultPrinterPrinter enumeration & defaultsQuickly read client system and printer information
Queue / cleanup / updates
Print status and control, system maintenance, automatic updates.
-
QueuePrint / GetQueue / RetryJobEnqueue · query · retryQuery and control print status
-
CleanDisk / CleanAppTempScan / clean / recycle bin / quotaScans temp files, caches and logs by category, with self-cleaning at startup
-
CheckUpdate / ApplyUpdateFetches new versions automatically and replaces in place after verificationAutomatic updates leave user data untouched
For the full guide to printing from links, see Print from a link; for all print parameters and defaults, see Print parameters & defaults.
Scenario → command mapping
Find the real command for a printing scenario directly — quick to integrate.
| Scenario | Capability | Real command |
|---|---|---|
| Documents / images / PDF | Print the file directly on the chosen printer | PrintFile / PrintPdf / AutoPrint |
| Waybills / labels | HTML template plus data variables, custom sizes | TemplatePrint + local QR codes + PrintBarcode |
| Thermal receipts | Raw commands print directly, barcodes and QR codes | PrintEscPos Thermal raw channel |
| remote printing | Device registration, job routing, offline catch-up | AO remote channel (terminals connect outbound) |
| Virtual preview / documents | Print to PDF/XPS files, layout intact | PrintToPdf / PrintToXps |
| System / device information | Enumerate printers, machine fingerprint, self-check drivers | GetPrinterList / GetPrinterDetail / GetMachineFingerprint |
| Status & control | Query, retry and cancel jobs | Queue GetQueue / RetryJob / CancelJob |
Licensed under the Mulan Permissive Software License, Version 2 (Mulan PSL v2). No bundled JS wrapper, no browser plugin and no extra server required. Source code and the full license text are available to read.