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
Render all pages and allow scrolling? #6547
Comments
Yes, that is true. The reason is that rendering pages that are out of view is expensive in terms of memory. However, you could do something like the |
@timvandermeij Just curious, I just tested out this svg method, it seems lightning fast comparing to the canvas method. Is there a reason we should use canvas over svg? |
The canvas back-end is the back-end that has been supported since the beginning of PDF.js. The SVG back-end is still experimental and cannot do everything that the canvas back-end can do, yet, nor is it as fast and memory efficient. If someone is interested in the SVG back-end to improve its rendering and performance, feel free to open a new PR or contact us on IRC. |
I have just started studying Pdf.js and I am a beginner. Does not the default pre-built viewer use canvas instead and allow also to scroll the whole document pages? I just looked inside the file viewer.js and there you can find canvas element and no svg. |
In the APIs provided, it seems that we can only render the PDFs page by page.
Does that mean if I want to make a view that allows the user to scroll through the whole pdf, I will have to render the pages one by one in a and insert them to a div?
I guess I will have to deal with the paging stuff myself too?
The text was updated successfully, but these errors were encountered: