Skip to content

Instantly share code, notes, and snippets.

@drcjar
Created October 24, 2016 12:24
Show Gist options
  • Save drcjar/b3b14aad12fc886037de306add83ec2b to your computer and use it in GitHub Desktop.
Save drcjar/b3b14aad12fc886037de306add83ec2b to your computer and use it in GitHub Desktop.
makes default xsane pdf saves be less big, run ./shrinkpdf.sh in directory containing xsane pdf saves
#!/bin/bash
#makes default xsane pdf saves be less big, run ./shrinkpdf.sh in directory containing xsane pdf saves
shopt -s nullglob
for f in *.pdf
do
echo "shrinking- $f"
pdf2ps "$f" "${f%.pdf}.ps"
done
for f in *.ps
do
ps2pdf "$f" "${f%.ps}.pdf"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment