Skip to main content

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

  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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compare_pdf-0.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

compare_pdf-0.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file compare_pdf-0.2.tar.gz.

File metadata

  • Download URL: compare_pdf-0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for compare_pdf-0.2.tar.gz
Algorithm Hash digest
SHA256 691fee00ad0a43d8829812b790fb8d7a41ad960356fc5fed72475169153750e8
MD5 8d0f785ee9f40bd944e8c1897cecbc61
BLAKE2b-256 32003200038adc6b613967ca40792d1303129bf7b75605ada4475b745087b724

See more details on using hashes here.

File details

Details for the file compare_pdf-0.2-py3-none-any.whl.

File metadata

  • Download URL: compare_pdf-0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for compare_pdf-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 083cd1f09bed83ae18a5cb2eddd85f5b0b8b4a20581f4c12c30b734616261a3b
MD5 9de12a8ea62ce0d27d904ec871392e58
BLAKE2b-256 a5aab8afbd6ee6db6ccbd70358d075cd815cd7e6f008190916aa3338bed3ce48

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page