QR Print Station supports two printing workflows: staff can print files manually by downloading them from the dashboard, or the server can run a shell print command automatically the moment staff click Mark Printing. Both paths converge on the same status lifecycle — the only difference is whether a shell command is executed in between.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hxmz-axfn07/qr-printing-sfw/llms.txt
Use this file to discover all available pages before exploring further.
Manual Printing
WhenPRINT_COMMAND is left empty in .env, clicking Mark Printing does nothing more than advance the order status from ready to printing. No shell command runs. Staff are responsible for opening the uploaded files from the dashboard and sending them to a printer themselves.
Open and print the files
Click each document link in the order card to open the file in a new browser
tab, then print it from your operating system or print dialogue.
Mark Printing
Click Mark Printing in the dashboard. The order moves to Printing
to reflect that the job is underway.
Automated Printing with PRINT_COMMAND
SetPRINT_COMMAND in .env to a shell command that your operating system’s print subsystem understands. When staff click Mark Printing, the server calls POST /api/orders/:id/print, transitions the order to Printing, then runs PRINT_COMMAND once for every document in the order.
How It Works
Staff click Mark Printing
The dashboard sends
POST /api/orders/:id/print with the admin token in
the X-Admin-Token header.Server checks order status
The server verifies the order is in
ready status. If not, it returns
400 Bad Request.Status transitions to Printing
The server immediately moves the order to
printing before running any
commands.PRINT_COMMAND runs per document
For each document in the order, the server formats
PRINT_COMMAND with the
document’s placeholders and runs it via the shell. Commands execute
sequentially.Non-zero exit code means Failed
If any command exits with a non-zero return code, the server immediately
transitions the order to
failed and stores the command’s stderr output as
the failure_reason. No further documents in the order are printed.Available Placeholders
The server substitutes the following placeholders in yourPRINT_COMMAND string before executing it. Placeholders that are not used are silently ignored.
| Placeholder | Value |
|---|---|
{file} | Absolute path to the uploaded file on disk |
{copies} | Number of copies requested by the customer |
{paper} | Paper size (e.g. A4, A3, Letter) |
{color} | Color mode: bw or color |
{style} | Print style: single or double |
Example Commands
{style} placeholder through to CUPS:
Command Timeout
The server runs each print command with a 60-second timeout:TimeoutExpired exception, which propagates as a 500 error. The order is not automatically failed on a timeout — check your print daemon if commands are hanging.