Skip to content

Instantly share code, notes, and snippets.

@k12ish
Created September 15, 2022 18:34
Show Gist options
  • Save k12ish/1eeffde7071212948a1f6c05e869eca3 to your computer and use it in GitHub Desktop.
Save k12ish/1eeffde7071212948a1f6c05e869eca3 to your computer and use it in GitHub Desktop.
Simple script that resizes PDF files to A4
DIRECTORY=.
for FILEPATH in $DIRECTORY/PDF-*.pdf; do
FILENAME="$(basename "$FILEPATH" .pdf)_A4"
pdftocairo -pdf -paper A4 $FILEPATH processed/$FILENAME.pdf
mv $FILEPATH processed/
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment