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.
Metadata
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 | Provenance | Actions |
|---|---|---|---|---|
| compare_pdf-0.2.tar.gz | 3.6 kB | Without provenance | Details for compare_pdf-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| compare_pdf-0.2-py3-none-any.whl | Python 3 | none | any | Details for compare_pdf-0.2-py3-none-any.whl |
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
|
Security for compare-pdf 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.