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
First, 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
Flags | Default | Description |
---|---|---|
-i/--inplace |
False |
Whether to compress PDFs in place. |
-s/--suffix |
'-compressed' |
String to append to the filename of compressed PDFs. Mutually exclusive with --inplace . |
--cl/--compression-level |
'recommended' |
How hard to squeeze the file size. One of ("low", "recommended", "extreme") . 'extreme' noticeably degrades quality of embedded bitmap images. |
--set-api-key |
Set the public key needed to authenticate with the iLovePDF API. You only need to do this once to start using. | |
--report-quota |
Report the number of remaining file operations in the current billing cycle for the stored iLovePDF API key. | |
--debug |
False |
When true, iLovePDF won't process the request but only reports the parameters that would have been sent to the server. |
-v/--version |
Get the version number of pdf-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.5.tar.gz
(10.3 kB
view hashes)
Built Distribution
Close
Hashes for pdf_compressor-0.1.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d602aef011adaea4c1cbf8da3441e76a3aafd1aaf3838c5cbc98535e31de4cf1 |
|
MD5 | d0b92e52a210c87235dd7b40e30039eb |
|
BLAKE2b-256 | 7f947b7d1be1a428a655ed2fb52a84e4c70bd60003bbd1391b88bdbb71284327 |