The rotation of the page is portrait, but content is rotated 90 degrees

Which product are you using?

PDF.js Express Version

Detailed description of issue
Anytime a user upload and visualize a portrait pdf, the tool rotate the page 90 degrees and it causes that the image be cut and part of the information is lost out of the frame which is a really bad UX for us. This is how the image is cut and rotated

Expected behaviour
PDF JS Express Plus must not rotate the image/pdf automatically. It must keep the same way as it was uploaded.

Does your issue happen with every document, or just one?
with every document. If we do it on your demo web page, it happens the same.

Link to document
{Provide a link to the document in question if possible}

Code snippet
It is not necesary because is a bad behavior of the component

Hi there,

Thanks for contacting pdf.js express forums,

Does the PDF have embedded rotation? You can check if the page is rotated or not using the getCompleteRotation API and then rotate the page accordingly using rotateClockwise or rotateCounterClockwise

https://pdfjs.express/api/Core.DocumentViewer.html#rotateClockwise__anchor

Best regards,
Kevin Kim

We have already used the method and the getCompleteRotation and the value returned was zero (0). That value indicates that the file doesn’t have rotation, however the visor showed it rotated. What that means is that for the visor see it as though it wasn’t rotated but it does when it showed it. This is an example, I can not share the file related in the first report because it has sensitive data, so I’ll do it with this:

When have this PDF file:
IMG_7784.pdf (567.6 KB)

If you open that file, You’ll see that it is not rotated. It is portrait oriented.

But once you use the PDF Visor, it rotates the file:

You can recreate it on your Demo site.

If we take this file to another tool as Apryse, It works as expected:

Hi there,

On both pdf.js express demo and the Apryse WebViewer demo, for the file you shared, if you look at the embedded rotation via getCompleteRotation API, it shows a value of 1 which is rotated clockwise once (90 degrees)

Best regards,
Kevin Kim

Please, Try with our file

Apryse

with PDF js. I have deleted this because of data protection

Hi there,

Thank you for the report.

We will add this to our backlog to be reviewed by the product team.

Best regards,
Kevin Kim