Open 90tamal90 opened 5 months ago
I think here all pages are rendered at same time .....if per page render when scrolling ....
No, the rendering is per-page basis. The problem seems in the page layout logic. It firstly calculates the width/height of all the pages.
I've tested pdfrx with large documents like PDF Reference and the loading speed is acceptable even if we dynamically download it.
So if your 500-page document takes so long time, the PDF file's structure is too much complicated. Without the file, we cannot check the actual issue.
If you're just talking about download progress, here it is.
And, the memory consumption is already optimized on the latest version. I think there's already no room to optimize the memory usage on pdfrx. If you need more optimization, we should do some in pdfium.
300 pages... 3-5seconds.
Please don't reuse a single issue for many things. I ignore all your questions on the issue.
I think it's quite normal to load 300 pages in 3-5 seconds. Only your issue is it just freezing before showing the pages. I understand your pain. But I'm still thinking how to do that...
@espresso3389 I think this could be the solution: https://apryse.com/blog/pdf-format/what-is-pdf-linearization https://github.com/mozilla/pdf.js/issues/8897
@letrungdo pdfrx uses pdf.js for web version so PDFJS.disableAutoFetch
might be an option though I think it does not work for the case.
By the way, why are you referencing PDF linearization here?
@espresso3389 PDF linearization I think for pdf files downloaded from url it will be necessary to download the first pages to display first, not having to wait for the file to finish downloading to display.
@letrungdo PDF linearization is how PDF content should be and it has nothing to do with PDF viewer.
When open a big size pdfs , like 500 pages pdf ....then the pdf loading time of too much ...... and memory consumption is too much ....please help me 🙏....