PDF Tool Manager (ptm) is a versatile command-line tool for managing and manipulating PDF files. It provides a range of functionalities for merging, splitting, compressing, converting and encrypting PDF documents.
-
Merge
- Description: Merge multiple PDF files into a single document.
- Flags:
-i
: Input file paths (multiple allowed)-o
: Output file path
- Example:
ptm merge -i input1.pdf -i input2.pdf -o output.pdf
-
Splitoe
- Description: Split a PDF file into separate files for odd and even pages, and package them into a zip file.
- Flags:
-i
: Input file-o
: Output zip file path
- Example:
ptm splitoe -i input.pdf -o output.zip
-
Compress
- Description: Compress a PDF file to reduce its size while optimizing the quality.
- Flags:
-i
: Input file-o
: Output PDF file path
- Example:
ptm compress -i input.pdf -o output.pdf
-
PDF to Images
- Description: Convert each page of a PDF file into images and package them into a zip file.
- Flags:
-i
: Input file-o
: Output zip file path
- Example:
ptm pdf2images -i input.pdf -o output.zip
-
Images to PDF
- Description: Convert images from a folder into a single PDF file.
- Flags:
-i
: Input folder path-o
: Output PDF file path
- Example:
ptm images2pdf -i input -o output.pdf
-
Encrypt PDF
- Description: Encrypt a PDF file with a password.
- Flags:
-i
: Input file-p
: Password-o
: Output PDF file path
- Example:
ptm encryptpdf -i input.pdf -p password -o output.pdf
Check the releases page to download the latest version of ptm (only Windows and Linux versions are available).
Clone the repository and follow the instructions for setup:
git clone https://github.com/venkatmidhunmareedu/pdf-tool-manager.git
cd pdf-tool-manager
# Create a virtual environment
python -m venv env_name
source env_name/bin/activate # For Linux
# or
.\env_name\Scripts\activate # For Windows
pip install -r requirements.txt
# Build commands
pyinstaller --onefile --noconsole main.py
# This will create a .exe file under the dist folder
# Use cmd to run the .exe file using the instructions above
- Complete the remaining features.
- More features are welcome. If you have any suggestions, please let me know via GitHub issues.
- Add more functionalities.
- Complete the docs and add more details.
- Reduce the complexity of the code.
Feel free to submit issues or pull requests to improve PDF Tool Manager.
This project is licensed under the MIT License. See the LICENSE file for details.