CLI + Python API for batch compressing PDFs with iLovePDF.com
Project description
The code in
ilovepdf.py
was inspired by Andrea Bruschi'spylovepdf
.
Command line PDF compression powered by the free iLovePDF API.
Installation
pip install pdf-compressor
Usage
Tell pdf-compressor
your iLovePDF API key (if you haven't yet, get one by signing up at https://developer.ilovepdf.com/signup):
pdf-compressor --set-api-key project_public_7c854a9db0...
Then start compressing!
pdf-compressor **/*.pdf
Options
pdf-compressor
has the following flags:
-i/--inplace
(optional, default:False
): Whether to compress PDFs in place.-s/--suffix
(optional, default:-compressed
): String to append to the filename of compressed PDFs. Mutually exclusive with--inplace
flag.--set-api-key
(optional): Set the public key needed to authenticate with the iLovePDF API.--debug
(optional, default:False
): When true, iLovePDF won't process the request but only reports the parameters that would have been sent to the server.-v/--version
(optional): Get the current version.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pdf-compressor-0.1.0.tar.gz
(8.3 kB
view details)
Built Distribution
File details
Details for the file pdf-compressor-0.1.0.tar.gz
.
File metadata
- Download URL: pdf-compressor-0.1.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf0b79ca0b2b29a382c73472e1c4fa198ac9f27f8fc5d119362ff9c31d0edd26 |
|
MD5 | f9e38ae631178a06289cb69e11260b70 |
|
BLAKE2b-256 | 54f1e9ac92a2090dde069abd63812600a3532a149c7070af427f1bd574500311 |
File details
Details for the file pdf_compressor-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pdf_compressor-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37a09871d244fdf2bf611f36d8865bee131f4507a13798c4541f222297cb2fd2 |
|
MD5 | 7580d60942fda4e87f5c76da7dc4da55 |
|
BLAKE2b-256 | d878ce7ed74a14e66b9e3fa3bb113c656abb4cba06750ca3415ead1442e08a8f |