Coder Social home page Coder Social logo

compare-pdf's Introduction


License PyPI PyPI - Downloads

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 for local development

  1. Clone the repository:

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

  2. Install the required dependencies:

    pip install pymupdf opencv-python

Installation for self usage

pip install compare-pdf

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.

compare-pdf's People

Contributors

formartha avatar

Stargazers

a.y.c avatar Haim Cohen avatar  avatar  avatar

Watchers

 avatar

Forkers

hzjj17

compare-pdf's Issues

fix readme

the readme file doesn't take in account how to install the package. should fix it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.