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
Add single page view for browsers #184
Comments
hello. pagedjs has no css to show pages on screen by default. It’s up to the user to set a css to preview the page if they want to. That said, we have a basic interface.css we use often which has the possibility to show page vs spread (the css file is commented to easily allow this). https://gitlab.coko.foundation/pagedjs/interface-polyfill/blob/master/interface.css One detail. we shouldn’t take the window size into account to define how the pages are gonna show. Pagedjs is a tool to make paginated version (pdf and print) and can’t compete with all the tools for accessibility a single html page can bring. Someone on a very small screen may want to make a very big book, and it’s up to them to decide how they wanna do it. But your issue makes me wonder if we should have a paged.preview.js to give a preconfigured screen preview for user who’d need it. |
I was refering to the So I thought you might support also other layouts for browsers.
In my opinion this would be great |
I changed the width property of .pagedjs_page to use minmax which allows one or two page layout depending on viewport width. This is a quick hack but worked for my use case. .pagedjs_pages {
display: flex;
width: minmax(var(--pagedjs-width), calc(var(--pagedjs-width) * 2));
flex: 0;
flex-wrap: wrap;
margin: 0 auto;
justify-content: center;
} This does not solve the problem of viewing on small screens. However, this strategy of modifying the interface.css could go a long way in making the preview more responsive. |
The document in the browser will be displayed with two pages side by side. This even doesn't change when reading the document on a smaller device like a tablet or a phone. This isn't pretty comfortable and responsive.
Instead add an optional single page view for browser, like the Adobe Acrobat Reader provides. So people can scroll through the pages more comfortable and more space to the left and right can be used to display the page.
This single page view could also be switched to when the size of the browser falls below a certain size.
The text was updated successfully, but these errors were encountered: