Reorder any PDF you like and save it in your local directory.

This python script will let you rearrange/reorder PDF and save them as a pdf file. The script uses PyPDF2.

Setting up:

  • Create a virtual environment and activate it.

  • Install the requirements

  $ pip install -r requirements.txt

Running the script:

  $ python PDF_reorder.py

Terminal Screenshot:

Image

The program will ask you to enter:

  1. File name.
  2. No. of Pages to reorder.
  3. Page no. with the location no. to move.
  4. filename(without '.pdf'). The pdf will be created in the same folder.

PDF INPUT:

Gif

PDF OUTPUT:

Gif

Author

Akhil Bhalerao

Acknowledgments

dzone