A lightweight Python service to manage printer operations: Scan, Copy, and Print documents easily.
config.json
config.json
file with your printer configurationClone the repository:
git clone https://github.com/JahongirHakimjonov/printer-service.git
cd printer-service
Install dependencies:
pip install -r requirements.txt
Create a config.json
file in the project root:
{
"printer_name": "Canon iR2006/2206 UFRII LT"
}
Make sure the printer name matches exactly as it appears in Windows Printer Settings.
Run the service:
python main.py
You will be prompted to select an operation:
Type | Description |
---|---|
SCAN | Start scanning a document |
COPY | Make multiple copies |
Print a file (PDF, etc.) |
Example flow:
$ python main.py
Type input (SCAN, COPY, PRINT): PRINT
How many pages to print?: 1-3
Enter the file path: D:\files\example.pdf
You can automate configurations or pass parameters using environment variables (future feature planned).
Planned CLI support:
python main.py --type PRINT --file_path "D:\docs\test.pdf" --pages "1-2"
For more information use this command:
python main.py --help
(Not available yet β currently interactive mode only.)
βββ config/ # Configuration files (e.g., config.json)
βββ resources/
β βββ output/ # Scanned/copied/printed file outputs
βββ src/
β βββ controller/ # Handles user inputs and flow control
β βββ exceptions/ # Custom exception classes
β βββ services/ # Core printer services
β β βββ copy/ # Copy service logic
β β βββ print_file/ # Print service logic
β β βββ scan/ # Scan service logic
β βββ utils/ # Utilities (logger, enums, etc.)
β βββ __pycache__/ # Python cache files (ignored)
βββ main.py # Application entry point
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
Jahongir Hakimjonov β Backend Developer
Please contact Jahongir Hakimjonov with any questions or concerns regarding this project.
This project is licensed under the MIT License.