Sideways or upside-down PDF pages are usually scan errors. Here's how to fix them permanently — not just for viewing.