- Using this script you can delete the pages you don't want with just one click.
- I have added a test PDF with the script which you can run to test the script.
- We use pdfrw library for this script.
- To install this library, type
pip install pdfrw
in your terminal. - To run the script run
python3 script.py
and then enter the information as prompted by the program.
A short demo of how the script works
Here We have a pdf file MyPDF.pdf from which we have to delete pages.
Running the script and entering path of the file and the page numbers to be deleted seperated by "," .
The pages in the PDF file has been deleted
Once you delete the pages using this script they cannot be RETRIEVED so be CAREFUL!