Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sepastian/7ea8fa2959bd447392648e284fdc9d34 to your computer and use it in GitHub Desktop.
Save sepastian/7ea8fa2959bd447392648e284fdc9d34 to your computer and use it in GitHub Desktop.
PDFTK: rotate even/odd pages differently
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# From https://unix.stackexchange.com/a/18631/56290
# Rotate even pages by 180 degrees, don't rotate odd pages.
pdftk A=infile.pdf shuffle Aoddnorth Aevensouth output outfile.pdf
@nemkin
Copy link

nemkin commented May 27, 2023

I spent hours on this... Thank you! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment