With the Software PDFScanner you can automatically straighten PDFs which you have scanned. Just enable the Deskew after scan option.

scanner