A simple package to visually compare PDF files
Project description
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
python compare_pdf.py --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
bashCopy code
python compare_pdf.py --pdf file1.pdf --pdf file2.pdf
This will compare file1.pdf
and file2.pdf
visually, reporting any differences found.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for compare_pdf-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 287e78021afe1b98c0086db05103448eab1a04dd28e08fb7f20db996a96a44dc |
|
MD5 | e3e178fc118a73fa9e486ea4278dcdfb |
|
BLAKE2b-256 | c2e23f7f5f06650c346dea84a7ffde4e85fd3c5eb5189f77a2eaa921d9e7e2e9 |