Command Line Interface
Overview
Auto Print provides two main command-line tools:
Configuration Generator – Interactive tool for setting up printing rules
Print Executor – Command-line tool to apply those rules to files
Note
If installed via the MSI installer:
Use
auto-print.exeto print files (also available in the right-click context menu for PDF files)Use
auto-print-config.exeor launch Auto Print Config from the Start Menu to configure rules
Configuration
The configuration file is stored at:
%USERPROFILE%\auto-printer\auto-printer-config.json
For details about the configuration file structure, see the Configuration File Structure section in the usage documentation.
Configuration Generator Commands
Interactive configuration generator for auto-print. This tool helps you create and manage printer configurations.
usage: auto_print_config_generator [-h]
The configuration generator provides an interactive interface with the following commands:
Command |
Short |
Description |
|---|---|---|
save |
s |
Save the configuration |
close |
c |
Close the config tool |
add |
a |
Add a config section |
delete |
d |
Remove a section |
show |
s |
Display the config |
change |
Reorder sections |
|
edit |
e |
Edit section content |
help |
h |
Display help |
repair |
r |
Validate printer availability |
Configuration Workflow
The configuration workflow follows these steps:
Launch the generator (via CLI or GUI)
Use the commands listed above to create and manage configuration sections
Use
saveto persist changesExit with
close
For details about configuration options and matching rules, see the Configuration File Structure and Document Routing Logic sections in the usage documentation.
Print Executor
Auto-print: A document routing application that automatically decides whether to print documents directly or open them with the default application based on filename patterns.
usage: auto_print_execute [-h] file_path
Positional Arguments
- file_path
Path to the file to be processed
Usage
From MSI installer:
auto-print.exe <file_path>
From source (Python):
python -m auto_print.auto_print_execute <file_path>
Execution Workflow
The print executor:
Confirms the file exists
Loads the configuration file
Processes the file according to the document routing logic
For detailed information about how files are matched and processed, see the Document Routing Logic section in the usage documentation.
Example
auto-print.exe invoice_123.pdf
This processes the file based on the matching configuration section.
Exit Codes
0: Success-1: No file specified-2: Too many arguments-3: File not found-4: Failed to load configuration-5: Ghostscript not found or other runtime error