PDF Visual Comparison Tool
This utility compares PDF files visually by converting each page into images and then comparing them using OpenCV. It's particularly useful for identifying differences between PDF files that may not be apparent through text comparison alone.
Features
- Compares PDF files visually, page by page.
- Supports multi-page PDF files.
- Reports differences between PDF files, specifying the page number and source file.
Requirements
- Python 3.x
- PyMuPDF (
fitz) library - OpenCV (
cv2) library
Installation
-
Clone the repository:
git clone https://github.com/Formartha/compare-pdf.git -
Install the required dependencies:
pip install pymupdf opencv-python
Usage
compare_pdf --pdf <path_to_pdf1> --pdf <path_to_pdf2> ...
- Replace
<path_to_pdf1>,<path_to_pdf2>, etc. with the paths to the PDF files you want to compare. - At least two PDF files are required for comparison.
Example
compare_pdf --pdf file1.pdf --pdf file2.pdf
This will compare full/path/to/file1.pdf and full/path/to/file2.pdf visually, reporting any differences found.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Release files for compare-pdf 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| compare_pdf-0.2.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| compare_pdf-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.9 kB
Release files / compare_pdf-0.2.tar.gz
| Download URL | compare_pdf-0.2.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
691fee00ad0a43d8829812b790fb8d7a41ad960356fc5fed72475169153750e8
|
|
BLAKE2b-256 checksum How to use checksums |
32003200038adc6b613967ca40792d1303129bf7b75605ada4475b745087b724
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / compare_pdf-0.2-py3-none-any.whl
| Download URL | compare_pdf-0.2-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
083cd1f09bed83ae18a5cb2eddd85f5b0b8b4a20581f4c12c30b734616261a3b
|
|
BLAKE2b-256 checksum How to use checksums |
a5aab8afbd6ee6db6ccbd70358d075cd815cd7e6f008190916aa3338bed3ce48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|