Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jishanshaikh4/shrinkpdf
Reduce size of PDF (compress) using GhostScript at bash terminal
https://github.com/jishanshaikh4/shrinkpdf
bash bash-script pdf shell shell-script
Last synced: about 2 months ago
JSON representation
Reduce size of PDF (compress) using GhostScript at bash terminal
- Host: GitHub
- URL: https://github.com/jishanshaikh4/shrinkpdf
- Owner: jishanshaikh4
- Created: 2019-11-29T05:12:20.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-07T16:58:10.000Z (about 2 years ago)
- Last Synced: 2023-03-04T01:37:04.378Z (almost 2 years ago)
- Topics: bash, bash-script, pdf, shell, shell-script
- Language: Shell
- Homepage:
- Size: 14.6 KB
- Stars: 26
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Shrinkpdf
[![CodeFactor](https://www.codefactor.io/repository/github/jishanshaikh4/shrinkpdf/badge)](https://www.codefactor.io/repository/github/jishanshaikh4/shrinkpdf)Reduce size of PDF (compress) using Ghostscript at terminal.
### Execution
Move the shrinkpdf.sh to your system execution folder (e.g. /bin/ in Linux distro). Give it permissions to execute
``chmod +x ~/bin/shrinkpdf.sh``
**First parameter (`input.pdf`):** filename of the PDF that is to be converted**Second parameter (`output.pdf`):** filename of the converted PDF
**Third parameter:** The DPI (resolution) for the output PDF. Default value: 72. For more compression, lower DPI is better but the quality will be worse.
Run it as follows:
~/bin/shrinkpdf.sh input.pdf output.pdf
~/bin/shrinkpdf.sh input.pdf output.pdf 100~/bin/shrinkpdf.sh input.pdf output.pdf 120
If you don't want to install shrinkpdf in the system, just runbash shrinkpdf.sh input.pdf output.pdf 72
#### Credits
https://bash.cyberciti.biz/file-management/linux-shell-script-to-reduce-pdf-file-size/