Command-line printing (Windows)
Print a .pos template without opening the GUI.
Syntax
posprint print <file.pos> --printer <PORT> --set Name=Value [--set Other=Value ...]
Short form:
posprint print receipt.pos -p COM3 --set StoreName="My Shop" --set DocumentNumber=1001
Rules
--printer/-p(required): USB-serial port name, e.g.COM3,COM4.--set NAME=VALUE(required for every parameter): one flag per${Name}in the template.- If any
${Name}is missing or empty, the command fails and lists missing parameters. - The GUI is not started when using the
printsubcommand.
Examples
List required parameters by opening the template in the designer, or inspect the ${...} tokens in the file body.
posprint print C:\receipts\sale.pos -p COM3 `
--set StoreName="Corner Cafe" `
--set DocumentNumber=42 `
--set Date=2026-07-15 `
--set GrandTotal=19.99
Printer port
- Open Device Manager → Ports (COM & LPT) to find the printer COM port.
- Install the USB-serial driver if the device is not listed.
- Close other programs using the same COM port before printing.
Exit codes
| Code | Meaning |
|---|---|
0 | Printed successfully |
1 | Error (missing parameters, parse error, port error, etc.) |
Help
posprint print --help
posprint --help
Launch the graphical designer by running posprint with no subcommand.
Source
| 1 | # Command-line printing (Windows) |
| 2 | |
| 3 | Print a `.pos` template without opening the GUI. |
| 4 | |
| 5 | ## Syntax |
| 6 | |
| 7 | ```powershell |
| 8 | posprint print <file.pos> --printer <PORT> --set Name=Value [--set Other=Value ...] |
| 9 | ``` |
| 10 | |
| 11 | Short form: |
| 12 | |
| 13 | ```powershell |
| 14 | posprint print receipt.pos -p COM3 --set StoreName="My Shop" --set DocumentNumber=1001 |
| 15 | ``` |
| 16 | |
| 17 | ## Rules |
| 18 | |
| 19 | - **`--printer` / `-p`** (required): USB-serial port name, e.g. `COM3`, `COM4`. |
| 20 | - **`--set NAME=VALUE`** (required for every parameter): one flag per `${Name}` in the template. |
| 21 | - If any `${Name}` is missing or empty, the command **fails** and lists missing parameters. |
| 22 | - The GUI is not started when using the `print` subcommand. |
| 23 | |
| 24 | ## Examples |
| 25 | |
| 26 | List required parameters by opening the template in the designer, or inspect the `${...}` tokens in the file body. |
| 27 | |
| 28 | ```powershell |
| 29 | posprint print C:\receipts\sale.pos -p COM3 ` |
| 30 | --set StoreName="Corner Cafe" ` |
| 31 | --set DocumentNumber=42 ` |
| 32 | --set Date=2026-07-15 ` |
| 33 | --set GrandTotal=19.99 |
| 34 | ``` |
| 35 | |
| 36 | ## Printer port |
| 37 | |
| 38 | - Open **Device Manager → Ports (COM & LPT)** to find the printer COM port. |
| 39 | - Install the USB-serial driver if the device is not listed. |
| 40 | - Close other programs using the same COM port before printing. |
| 41 | |
| 42 | ## Exit codes |
| 43 | |
| 44 | | Code | Meaning | |
| 45 | |------|---------| |
| 46 | | `0` | Printed successfully | |
| 47 | | `1` | Error (missing parameters, parse error, port error, etc.) | |
| 48 | |
| 49 | ## Help |
| 50 | |
| 51 | ```powershell |
| 52 | posprint print --help |
| 53 | posprint --help |
| 54 | ``` |
| 55 | |
| 56 | Launch the graphical designer by running `posprint` with **no** subcommand. |