AndyCyberSec / pylovepdf

ilovepdf.com python API library
GNU General Public License v3.0
75 stars 24 forks source link
compress ilovepdf mergepdf officetopdf pagenumbers pdf pdfa pdfeditor protect protectpdf python rotate splitpdf unlock unlockpdf watermark

pylovepdf 1.3.3 - Unofficial, Unmaintained.

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

Installation (older version)

pip install pylovepdf 

Manual installation (up to date)

Download the latest release.

python setup.py install

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:

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

Versioning

I use SemVer for versioning.

Authors