ilovepdf.com python API library
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4fdcf99 Jul 7, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
pylovepdf Speed up recognition of incoming files Jul 6, 2018
.gitattributes Initial commit Feb 22, 2018
.gitignore Reorganized file structure Feb 22, 2018
CHANGES.txt v1.3.2 Jul 7, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Feb 23, 2018
LICENSE.md Reorganized file structure Feb 22, 2018
MANIFEST.in Update Feb 22, 2018
README.md v 1.3.2 Jul 7, 2018
setup.py changed version to 1.3.1 Mar 31, 2018

README.md

pylovepdf 1.3.2

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

pip install pylovepdf

Manual installation

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:

  • 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

Versioning

I use SemVer for versioning.

Authors

Acknowledgments

  • mumble mumble..