We've all received that one scanned document where half the pages are upside down and the other half are sideways.
Viewing vs. Saving
Most PDF viewers let you rotate the page temporarily, but the next time you open it, it's upside down again. You need a tool that modifies the actual file.
The PDF BOX Rotate tool permanently changes the rotation metadata of the pages so that it opens correctly on every device, forever.