ilovepdf.com python API library
Project description
pylovepdf 1.3.3
ilovepdf.com python API library
What it does
This library allow to manipulate pdf using the API of http://www.ilovepdf.com. See the Tools section to know what you can do.
Prerequisites
- [developer account] (https://developer.ilovepdf.com) to get a public key to use the API.
- [Python 3.x.x]
- [Requests] (http://it.python-requests.org/it/latest/)
Getting started
Example files are located inside samples/. Change file paths and the public_key parameter with the one you found in your developer account (See prerequisites). Run the files and enjoy.
Tools
Currently the following tools are available:
- compress (Reduce the size of pdf files)
- imagepdf (Converts an image to pdf)
- merge (Merge multiple pdf into single file)
- officepdf (Office document to pdf conversion)
- pagenumber (Place numbers on pages)
- pdfa (Converts into PDF/A)
- pdfjpg (Converts a pdf into jpeg image)
- protect (Add password to a pdf)
- rotate (Rotates the pages of a file)
- split (Split a pdf)
- unlock (Remove the password security from the pdf, the coolest feature ever!)
- validatepdfa (Checks the conformity of PDF/A format)
- watermark (Adds watermark to the file)
Example Usage (compress tool)
from pylovepdf.ilovepdf import ILovePdf
ilovepdf = ILovePdf('public_key', verify_ssl=True)
task = ilovepdf.new_task('compress')
task.add_file('pdf_file')
task.set_output_folder('output_directory')
task.execute()
task.download()
task.delete_current_task()
Alternative Example Usage (compress tool)
A tool can be created directly:
from pylovepdf.tools.compress import Compress
t = Compress('public_key', verify_ssl=True)
t.add_file('pdf_file')
t.set_output_folder('output_directory')
t.execute()
t.download()
t.delete_current_task()
Documentation
Please see https://developer.ilovepdf.com/docs for up-to-date documentation.
Built With
- pyCharm - python IDE
Versioning
I use SemVer for versioning.
Authors
- Andrea Bruschi - Initial work - AndyCyberSec
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylovepdf_flavor-1.3.3.1-py3-none-any.whl.
File metadata
- Download URL: pylovepdf_flavor-1.3.3.1-py3-none-any.whl
- Upload date:
- Size: 67.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8550c121a5ffc4182bc7919cf0bc4a76bbed187aaa48c74a811a6b8c6b9fae58
|
|
| MD5 |
4e6fd0013c7037fd4374c4d843c58cf5
|
|
| BLAKE2b-256 |
0fa37e2823a438af1490bf5b820f7221c3704b5e15a14e65c3a94a6a4e75eb2f
|