MOCON Project’s End of Day Update Version:
- Full redesign with AdvancedRx branded PDF design (navy & gold)
- Parser now handles all PRN file format variations regardless of MOCON firmware
- BAT file fixed — works on any machine, auto-installs dependencies
- Various bug fixes and formatting improvements
- Updated Sections and Graphs
- Added more dynamic code for conversion
- Updated Graphs
- Moved Date Signed & Reviewed Placeholders
- Updated Graphs
- Updated Custom Fields
- Added Custom Fields
- Added Graphs
- Added Custom Field
The objective of this project is to develop a Python-based automation script (bot) to handle the conversion of .prn files into .pdf format. The solution will run on Windows and will be executed from the command prompt, with task scheduling managed by Windows Scheduler.
- The script will continuously monitor a specified directory (filepath) for incoming
.prnfiles. - Upon detecting a new
.prnfile, the script will process the file, extracting data by reading it in a sequential manner (top to bottom, left to right). - The extracted data will then be converted into a
.pdffile and saved to a designated folder that syncs with Google Drive for easy access and storage.
- A configuration file will be created where admins can specify:
- The directory to scan for
.prnfiles. - The target location for saving the converted
.pdffiles.
- The directory to scan for
- The script will read and follow these configurations to ensure it operates as expected.
- The script will handle unexpected errors, such as issues with file encoding or structure, by skipping the problematic
.prnfile and continuing to monitor for new files. - In case of an error, the script will raise an error message, log it for debugging, and stop further processing of the current file, but will not halt the entire monitoring loop. A delay mechanism (e.g., 10 seconds) will be implemented to prevent system overload during the scanning process.
- The script will run in an infinite loop, continuously scanning the configured folder for new
.prnfiles. - The loop will have a slight delay (roughly 10 seconds) to prevent resource overload while ensuring files are processed in a timely manner.
The goal of this project is to automate the .prn to .pdf conversion process in an efficient and fault-tolerant manner, ensuring reliable and seamless integration with Google Drive. The script will be simple to configure and flexible enough to handle potential errors, enabling continuous operation without manual intervention.






