A Python library for iLovePDF API to automate PDF processing tasks such as compressing, merging, splitting, converting, protecting, and more.
You can sign up for an iLovePDF account at https://developer.ilovepdf.com
Develop and automate PDF processing tasks like Compress PDF, Merge PDF, Split PDF, convert Office to PDF, PDF to JPG, Images to PDF, add Page Numbers, Rotate PDF, Unlock PDF, stamp a Watermark and Repair PDF. Each one with several settings to get your desired results.
- Python 3.10 to 3.14
You can install the library via PIP. Run the following command:
pip install ilovepdfFor other install options (source, pre-release), see INSTALL.md.
- Get your API keys from https://developer.ilovepdf.com
- Run a task:
from ilovepdf import CompressTask
task = CompressTask(public_key="your_public_key", secret_key="your_secret_key")
task.add_file("document.pdf")
task.execute()
task.download("output_folder")- Core library:
ilovepdf/ - Example scripts:
samples/ - Unit & integration tests:
tests/ - Installation:
INSTALL.md- All install options - Development:
DEVELOPMENT.md- Contributing & setup - Docker & environment setup:
.docker/
For full API docs, visit developer.ilovepdf.com