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

Bug fix for the issue #3