Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fit to width with files containing pages having different formats #134

Open
gtache opened this issue Sep 4, 2020 · 2 comments · May be fixed by #135
Open

Fit to width with files containing pages having different formats #134

gtache opened this issue Sep 4, 2020 · 2 comments · May be fixed by #135

Comments

@gtache
Copy link
Contributor

gtache commented Sep 4, 2020

The Fit to width option (and others maybe) behaves incorrectly when a pdf file contains pages with different sizes.
It probably considers only the width of the current page, but if there are pages which are wider, there will be an horizontal scrollbar at the bottom and the current page won't be centered in the viewport.
Fit to width should consider the widest page in the document to adapt the view.

@pcorless
Copy link
Owner

This is a tricky one as checking each pages actual size can be really expensive and most documents are of the same size. Can you give a bit more background on the original user issue. I've been playing around with a few viewers that I have installed and the behaviour does seem to vary quite a bit. Would fit to width using the current page be an option for some of your users, basically select fit to width again and it's done for the current page? The trouble is mainly with column page views, the page views could be made reflect the page fit mode on a page by page basis fairly easily.

@gtache
Copy link
Contributor Author

gtache commented Sep 10, 2020

Regarding the performance issues, I'll trust your judgement, but I've tried it with a 744 pages long document and selecting fit to width or changing the view (one column/one page/etc) is pretty much instantaneous.
The main problem is if you have a document containing a mixture of pages, some in portrait and some in landscape, the function is pretty much broken. I'll try to create an example tomorrow, given that the document mentioned before is confidential.
And indeed, ideally, for the page views, fitting them on a page by page basis would be the best.

gtache pushed a commit to gtache/icepdf that referenced this issue Jul 25, 2023
gtache pushed a commit to gtache/icepdf that referenced this issue Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants