VadimDez / ng2-pdf-viewer

📄 PDF Viewer Component for Angular
https://vadimdez.github.io/ng2-pdf-viewer/
MIT License
1.3k stars 420 forks source link

Large file not shows starting pages quickly, is there any way to control chunk requests' sequence for linearization? #1079

Open Himesh512 opened 7 months ago

Himesh512 commented 7 months ago

I am Using ng2-pdf-viewer package to view pdf file.

It is working fine for small sized documents and it's not taking much time to show to user,

but when it comes to large file PDF which is Linearized as well causing to much time to show to user.

what i observed that while making chunk call first partial call gets range with 0-1MB, but very next partial call sends request for near about last 1Mb range.

my guessing that due to those chunk sequence Linearization is not working properly for ng2-pdf-viewer.

is there any way we can make partial calls in sequence from configuration based?

i found range we can pass which is the instance of PDFDataRangeTransport but there isn't any document or way i found to work with?

Any observation or help is appreciated form the community.

@VadimDez @dependabot @AntonioDA any inputs you guys can provide.

Thanks

venkat012chinna commented 3 months ago

You found any alternatives @Himesh512 also could you please share how to get chunks data from linearized pdf.. could you please share me the code approach to me on venkat012chinna@gmail.com

Himesh512 commented 3 months ago

@venkat012chinna

Well i have managed to work by downgrading it's version to 8.0.1 as after that version linearization is broken i found pdf-dist library change was there in that 9.0.0 version.

you can check by downgrading it.

venkat012chinna commented 3 months ago

@Himesh512 Could you please provide chunk load implementation. It would be helpful. I have same requirement now. Could you please share some code snippet here or on my mail. Thanks in advance