fixed scale calculation for pdfs with rotated pages