betteria
A commandline tool to enhance PDFs from Internet Archive.
Installation
pip install betteria
Usage
betteria --help
usage: betteria [-h] --input INPUT [--output OUTPUT] [--dpi DPI] [--threshold THRESHOLD] [--block-size BLOCK_SIZE] [--c-val C_VAL] [--adaptive]
[--invert] [--quiet] [--jobs JOBS] [-v]
Clean and compress a scanned PDF by whitening pages and saving as CCITT Group 4 TIFFs (via a manual page-by-page approach).
options:
-h, --help show this help message and exit
--input INPUT Path to input PDF
--output OUTPUT Path to output PDF (default: <input-stem>-enhanced.pdf)
--dpi DPI DPI for rasterizing PDF pages (default: 150)
--threshold THRESHOLD
Global threshold value (0-255)
--block-size BLOCK_SIZE
Odd-sized neighborhood for adaptive thresholding (default: 31)
--c-val C_VAL Constant subtracted in adaptive thresholding (default: 15)
--adaptive Use adaptive thresholding instead of a global threshold (default: on)
--invert Invert pixels before thresholding (for light text on dark background, default: off)
--quiet Disable progress bars (default: show progress)
--jobs JOBS Parallel workers for rasterizing and whitening ('auto'/0 uses logical cores; use 1 to disable)
--rasterizer RASTERIZER
Poppler rasterizer to use ('pdftoppm' or 'pdftocairo') (default: pdftocairo)
-v, --version show program's version number and exit
Metadata
Release files for betteria 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| betteria-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Release files / betteria-0.1.2-py3-none-any.whl
| Download URL | betteria-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f20b8581a670f3a2f2e39b8c60b8171b55cab1622f615a396aaabebfd2a8978b
|
|
BLAKE2b-256 checksum How to use checksums |
39b3e158877d01a7b1ca67e8d95b2466b9626bf3b50e5dba20bf9374ce48f875
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|