Python module that wraps the iLovePDF REST API.
$ git clone [email protected]:sdelquin/ilovepdf.git
$ cd ilovepdf
$ pipenv installSet your settings in the
.envfile.
Example of compressing a file:
from ilovepdf import ILovePdf
i = ILovePdf(config.PUBLIC_KEY, config.SECRET_KEY)
i.new_task('compress')
i.add_file('input.pdf')
i.execute()
i.download('compressed_doc.pdf')Example of compressing a file:
$ python ipdf.py compress --verbose -o compressed_doc.pdf input.pdfImplemented tasks:
mergesplitcompresspdfjpgimagepdf
In order to work properly with the module, you will have to get the developer keys from https://developer.ilovepdf.com/. You will have to sign up and then go to Console -> My project. There you will find two keys:
- Project key (JTI Claim) aka Public key.
- Secret key.
Add these keys to
.envfile.
$> pytest