pdfblah.com

← All guides

Fix upside-down and sideways pages, automatically

Feed a stack of paper into a scanner and the PDF comes out with page 7 upside down and page 12 on its side. Fixing that by hand means finding each one. rotate --auto reads which way the text runs on every page and turns the wrong ones right.

How to do it

pip install "pdfblah[app]"
pdfblah doctor --install     # fetches Tesseract, which does the orientation reading

pdfblah rotate scanned.pdf fixed.pdf --auto
fixed 2 of 41 page(s)
  page 7: rotated 180
  page 12: rotated 270
  (too little text to judge: page(s) 33, left alone)  ->  fixed.pdf

Why it's safe to run on anything

Tips