[pdf] fix issue #3: PDFs with mixed orientations not displayed correctly