This project is a PDF Analyzer tool that extracts tables from PDF files and saves them as CSV files. It provides a simple user interface for selecting multiple PDF files and shows a progress bar for the processing of each PDF file.
- Python 3.x
- pdfplumber
- pandas
- tkinter
- tesseract (
- Download: https://github.com/UB-Mannheim/tesseract/wiki
- Add to windows path: C:\Program Files\Tesseract-OCR - Check It is present and installed on right place )
- Clone the repository.
- Install the required dependencies using:
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
Run the main.py
file to start the application:
python BruckerCo.py
`M\d+\.\d+` Example: M2.1
`M-\d{3}` Example: M-001
`M\d+\.\d{2}` Example: M1.01
`M\d+-\d{3}` Example: M1-100
`M-\d+\.\d+` Example: M-1.0
`M\d{3}` Example: M001
`M[a-zA-Z]\d+\.\d+` Example: ME1.1
`M\d{1,2}-\d{2}` Example: M1-25
To generate an executable (.exe) file for Windows, follow these steps:
- Install PyInstaller:
pip install pyinstaller
- Navigate to your project directory:
cd path\to\your\project
- Run PyInstaller:
pyinstaller BruckerCo.spec
- Run Exe and save crash report
.\BruckerCo.exe > crash_log.txt 2>&1
- Locate the executable: After PyInstaller finishes, you'll find your executable in the dist directory inside your project folder:
pdf_analyzer\dist\main.exe
Additional PyInstaller Options You can customize the executable with additional options:
--icon=icon.ico: To add an icon to your executable. --add-data 'src;dest': To add non-Python files (e.g., data files). --noconsole: To disable the console window (useful for GUI applications).
# Activate your virtual environment if not already active
source myenv/bin/activate # On macOS/Linux
myenv\Scripts\activate # On Windows
python -m venv venv
# Basic command
pyinstaller --onefile BruckerCo.py
# With an icon and additional options
pyinstaller --onefile --icon=logo.ico --hidden-import=module1 --hidden-import=module2 BruckerCo.py
# Using UPX (ensure UPX is installed and path is correct)
pyinstaller --onefile --icon=myicon.ico --strip BruckerCo.py
- Add Resource Icon
First Add it in project and then add it resources.qrc and run below command
pyrcc5 -o resources_rc.py resources.qrc
- Extracts tables from PDF files and saves them as CSV files.
- Provides a simple UI for selecting multiple PDF files.
- Displays a progress bar for each PDF file being processed.