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
.--cl/--compression-level
(optional, default:'recommended'
): How hard to squeeze the file size.'extreme'
noticeably degrades quality of embedded bitmap images.--set-api-key
(optional): Set the public key needed to authenticate with the iLovePDF API. You only need to do this once to start using.--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 your version number ofpdf-compressor
.
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.3.tar.gz
(9.2 kB
view hashes)
Built Distribution
Close
Hashes for pdf_compressor-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7d729ff56db08bff21bb84d13736a6170eabde233688b0c29655a6e74bf8a8f |
|
MD5 | 844d0b788fb12c23ecb85bfbb3bfae16 |
|
BLAKE2b-256 | 315224b150a3cdfa8562c5c73c4013e263cc9e2964ee742991ff2b751573f97e |