BlueGit

timfa posprint

Files

posprint / docs / HELP-CLI-WINDOWS.md

HELP-CLI-WINDOWS.md

HELP-CLI-WINDOWS.md 1.5 KiB Download Raw

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 print subcommand.

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

CodeMeaning
0Printed successfully
1Error (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
3Print a `.pos` template without opening the GUI.
4
5## Syntax
6
7```powershell
8posprint print <file.pos> --printer <PORT> --set Name=Value [--set Other=Value ...]
9```
10
11Short form:
12
13```powershell
14posprint 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
26List required parameters by opening the template in the designer, or inspect the `${...}` tokens in the file body.
27
28```powershell
29posprint 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
52posprint print --help
53posprint --help
54```
55
56Launch the graphical designer by running `posprint` with **no** subcommand.