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.--report-quota
(optional): Report the number of remaining file operations in the current billing cycle for the stored iLovePDF public API key.--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.2.tar.gz
(8.7 kB
view hashes)
Built Distribution
Close
Hashes for pdf_compressor-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d1cd3868b4fff08cb3d7a75b11f195b820f6b7f979f9a8414a665dc8a8fd801 |
|
MD5 | a49593297599fa53ad83ded640be406b |
|
BLAKE2b-256 | 283233f7b35ac201cd1015c1cdc989a9d7a96c80bb1a38190f53ee41b656198b |