Skip to main content

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

  1. Clone the repository:

    git clone https://github.com/Formartha/compare-pdf.git

  2. 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)

Source distribution for compare-pdf 0.2
File Size Uploaded
compare_pdf-0.2.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for compare-pdf 0.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page