[BASH] Add a function to compress pdf
This commit is contained in:
parent
f15f2282e3
commit
9e3a0283dc
1 changed files with 17 additions and 0 deletions
17
.bashrc
17
.bashrc
|
@ -175,4 +175,21 @@ function syncSubSessionCloud() {
|
|||
rsync -av --delete /media/HDD1/NextcloudSS/Sub-Session/ "/media/raghnarok/SubSession$disk/cloud/"
|
||||
}
|
||||
|
||||
function pdfcompress(){
|
||||
if [ -z ${3+x} ];
|
||||
then
|
||||
quality=printer
|
||||
else
|
||||
case $3 in
|
||||
ebook | screen | printer | prepress | default )
|
||||
quality=$3
|
||||
;;
|
||||
*)
|
||||
quality='default'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/$quality -dNOPAUSE -dQUIET -dBATCH -sOutputFile="$2" "$1"
|
||||
}
|
||||
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
|
|
Loading…
Reference in a new issue