python code for simple program to check two pdf files for identical content
This is a simple Python program that checks if two PDF files are identical by comparing their SHA-1 hashes. The program allows users to upload two PDF files using a graphical interface and determines whether the files are the same or not.
- Upload two PDF files through a graphical file dialog.
- The program compares the files by calculating their SHA-1 hashes.
- Displays whether the files are identical or not.
- Python 3.x
tkinter(for the graphical file selection dialog, typically comes pre-installed with Python)
-
Clone this repository to your local machine:
git clone https://github.com/Fardeen2903/PDFchecker.git
-
Navigate to the project directory:
cd pdf-file-checker -
Run the script using Python:
python pdfchecker.py
-
Select two PDF files when prompted by the graphical file dialog.
- When you run the program, a file dialog will prompt you to select the first PDF file.
- After selecting the first file, the dialog will prompt you to select the second PDF file.
- The program will then compare the files by their SHA-1 hash and print the result:
- If the hashes are identical, it prints: "These files are identical."
- If the hashes are different, it prints: "These files are not identical."
This project is licensed under the BSD 2-Clause License - see the LICENSE file for details.