项目作者: tezzytezzy

项目描述 :
Bash script to compress PDF files via Ghostscript
高级语言: Shell
项目地址: git://github.com/tezzytezzy/pdf-batch-compressor.git
创建时间: 2021-02-14T14:37:55Z
项目社区:https://github.com/tezzytezzy/pdf-batch-compressor

开源协议:

下载


PDF Batch Compressor

Functionality

This nifty utility compresses PDF files via Ghostscript in the folder where this script resides:

:one: Create a sub-folder, ./compressed, and put the resultant compressed ones in it,
:two: Compress files with any PDF extentions i.e., .pdf, .PDF, .pDf and so on,
:three: Optional compression parameter to be supplied, namely, prepress, ebook (default) and screen - in the descending order of quality, and
:four: Log output with the compressed file names and any error message in the sub-folder

N.B. Make sure to make this script excutable via chmod +x or chmod 755, after downloading!

Installation

  1. (base) to@mx:~$ bash --version
  2. GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
  3. (base) to@mx:~$ gs --help
  4. GPL Ghostscript 9.26 (2018-11-20)

Help

  1. tezzy@HP:~/Desktop$ ./pdf_batch_compressor.sh -h
  2. NAME
  3. Compress all the PDF files in the same folder as this script resides via
  4. Ghostscript and put them into a newly created "compressed" sub-folder
  5. SYNOPSIS
  6. pdf_batch_compressor.sh [OPTION]
  7. DESCRIPTION
  8. -s, --setting=SETTING
  9. override default ebook; prepress, ebook or screen (in the descending order of quality)
  10. -h, --help
  11. display this help and exit