Issue searching documents with different size pages

PDF.js Express Version
7.3.1

Detailed description of issue
We have pdf’s which have different sized pages, some are horizontal even. The issue I am seeing is when using the search feature, when choosing different results it causes the pages to bounce around in “fit to width” mode. So if your clocking on results from different pages sometimes you will see the bottom right corner of the page, then it moves to upper left, etc.

Expected behaviour
The pages to stay centered in the window and don’t move around.

Does your issue happen with every document, or just one?
Happens with documents that have different size pages.

Link to document

Code snippet
{Provide a relevant code snippet}

Hey there,

I don’t really understand what you mean by “Bouncing around”.

I tried searching through that document in fit to width mode and it seemed to work as expected.

Could you please record a gif/video of this happening, or provide detailed instructions on how to reproduce the problem. Thanks!

Hey Logan, thanks for the quick response.

Sur here’s a gif, you’ll see as I scroll down and choose different results it jumps from the right side of the page to the left. Let me know if you need anything else.
pdf-example

Oh okay I see,

So the desired behaviour is that the document stays centered, correct?

Yes, it appears this happens due to other pages not in the viewport being wider? Unsure, seems like this only happens with pdfs like this. We pull documents from the FDA site which is why some of them are like this, but yea if that could be worked out it would be great.

Sounds good Andy,

This is not going to be a super high priority ticket for us as everything is still working pretty smoothly, but we will add it to our backlog and I will let you know when we find a solution.

Thank you,
Logan Bittner