https://github.com/fahadelahikhan/ghostscript-pdf-compression
Python Scripts to compress PDF files using Ghostscript.
https://github.com/fahadelahikhan/ghostscript-pdf-compression
filecompression ghostscript pdf pdf-compression pdf-compression-and-optimization pdf-compressor pdf-processing python
Last synced: 6 months ago
JSON representation
Python Scripts to compress PDF files using Ghostscript.
- Host: GitHub
- URL: https://github.com/fahadelahikhan/ghostscript-pdf-compression
- Owner: fahadelahikhan
- License: other
- Created: 2025-07-05T17:27:43.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-07-09T14:19:48.000Z (6 months ago)
- Last Synced: 2025-07-09T14:43:45.244Z (6 months ago)
- Topics: filecompression, ghostscript, pdf, pdf-compression, pdf-compression-and-optimization, pdf-compressor, pdf-processing, python
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# PDF Compression
## Ghost Compression Usage:
### 1. Interactive mode (prompts for compression choice)
```
python compressor.py document.pdf
```
### 2. Batch directory processing with interactive mode selection
```
python compressor.py ./pdfs -o ./compressed
```
### 3. Skip interactive selection, use specific mode
```
python compressor.py document.pdf -c aggressive
```
### 4. Non-interactive batch mode (uses recommended compression)
```
python compressor.py ./pdfs --batch -o ./output
```
## Beast Compression Usage:
### 1. Single file
```
python beast_compressor.py document.pdf
```
### 2. Directory with custom output
```
python beast_compressor.py ./documents -o ./compressed
```
### 3. With custom Ghostscript path
```
python beast_compressor.py file.pdf -g "D:\gs\bin\gswin64c.exe"
```
© 2025 Fahad Elahi Khan · Licensed under [CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/)