Tweak in calculating width and height ratio for landscape pdf page