A Flask driven restful API for comparing two PDF files.


This project contains a POST endpoint (../compare) which takes in two PDF files as form-data input and returns a pdf which contains a side by side comparison of each page in the input PDFs.

Installation / Usage

  • If you wish to run your own build, first ensure you have python3 globally installed in your computer.

  • After this, ensure you have installed virtualenv globally as well. If not, run this:

    pip install virtualenv
  • Git clone this repo

    git clone
  • cd into your the cloned repo

    cd compare-pdf
  • Create and activate your virtual environment:

    virtualenv -p python3 venv
    source venv/bin/activate
  • Install your requirements

    (venv)$ pip install -r requirements.txt
  • Running the Server

    On your terminal, run the server using this one simple command:

    (venv)$ flask run
  • You can now test the endpoint from Postman or anyother API platform by sending a POST request to with the two pdf files as ‘f1’, ‘f2’ form-data.


View Github