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.1.tar.gz
(8.3 kB
view details)
Built Distribution
File details
Details for the file pdf-compressor-0.1.1.tar.gz
.
File metadata
- Download URL: pdf-compressor-0.1.1.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 | a76f12de7d89f82fbac8cee1fd9aecdb6404ca30470d0c17a0c03fa28c173852 |
|
MD5 | 4961b9343897848d1be421878d5e5714 |
|
BLAKE2b-256 | af3cf300bdb152ee2391cd0f38fd5b5868348c399d8a1428c67c7f45c2b22d58 |
File details
Details for the file pdf_compressor-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: pdf_compressor-0.1.1-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 | ba7557ff3e5f1af988f0d546b89ad08d699bb98ef15e6484c14f08e6879abad8 |
|
MD5 | 76437bfc7f97ce62cd60b8bd5e92b1bb |
|
BLAKE2b-256 | 6877356fcd681ac00591a5204090b07f4d294644609a1fecc7c10f1a69eacaca |