This is a simple C# command-line application that watches a folder for newly added JPEG, BMP, or TIFF image files, prints them to a specified printer, and then moves the printed files to a "Finished" folder. All actions, including success and errors, are logged to a log file. The app uses a configuration file to set parameters such as input/output folders, printer name, and log file location. The idea behind this application is to watch for FTP event snapshot image uploads from an NVR/Surveillance System and to subsequently print the snapshot(s).
- Monitors a specified folder for image files (JPEG, BMP, TIFF).
- Prints the files to a specified printer.
- Moves the processed files to a "Finished" folder.
- Logs all actions (success and errors) to a log file.
- Configurable through an
AppConfig.config
file.
- .NET Framework (or .NET Core)
- A valid printer installed on your system.
- Clone the repository to your local machine:
git clone https://github.com/t-jones14/Image-Watcher-and-Printer.git
- Open the project in your preferred IDE (e.g., Visual Studio).
- Modify the
AppConfig.config
file to match your folder paths and printer settings. - Build and run the project.
You can configure the application using the AppConfig.config
file. Here's an example:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<!-- Input folder where the app will watch for new images -->
<add key="InputFolder" value="C:\\Images\\Input"/>
<!-- Output folder where processed (printed) images will be moved -->
<add key="OutputFolder" value="C:\\Images\\Finished"/>
<!-- Log file path where event logs will be stored -->
<add key="LogFile" value="C:\\Logs\\fileProcessing.log"/>
<!-- Name of the printer where the images will be printed -->
<add key="PrinterName" value="YourPrinterName"/>
</appSettings>
</configuration>
- Place any
.jpg
,.jpeg
,.bmp
, or.tiff
image files into the folder specified in theInputFolder
config setting. - The application will automatically detect new files, print them, move them to the
OutputFolder
, and log the event. - To stop the application, press 'q' in the console.
The application writes logs to a file specified in the LogFile
setting. It logs each file processed, including success and error messages.
- Input/Output Folders : Modify the
InputFolder
andOutputFolder
paths in theAppConfig.config
file. - Printer Name : Set the printer name in the
PrinterName
setting. - Logging Path : Customize the path of the log file by changing the
LogFile
setting.
- Ensure that the printer name in the
AppConfig.config
matches the name of an installed printer on your system. - The application only supports
.jpg
,.jpeg
,.bmp
, and.tiff
image formats.
Feel free to open issues and submit pull requests if you have suggestions or improvements for this project.
This project is licensed under the GNU GPL v3 License - see the LICENSE file for details.