tsgrp / OpenAnnotate

TSG's Browser-based Annotation Tool
8 stars 4 forks source link

AEV displays landscape pages in portrait #935

Closed Kovacinski closed 2 years ago

Kovacinski commented 2 years ago

When viewing a document that has a landscape page orientation, AEV will display it with a portrait orientation: Here is an example of a document in AEV: document_in_AEV

Here is that same document outside of AEV: document_outside_of_aev

This issue appears to be due to the pdf box library switching the height and width values of the document. In the getPDFPageDimensions function we use pdPage.getMediaBox().getWidth() and pdPage.getMediaBox().getHegiht() to retrieve the documents height and width resolution. As the image below shows, pdf box seems to be reversing these values:

document_width_height_resolution_reversed

When looking at the documents metadata, we can also see that the general page size for the document is also landscape: document_meta_data

gsteimer commented 2 years ago

Moved to Jira: https://alfresco.atlassian.net/browse/SEP-72