You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using pdfjs to get some huge documents (over 50,000 pages). I have a server setup to accept range requests to make this more efficient. I have my call to getDocument setup as such: const loadingTask = pdfjsLib.getDocument({ url: url, disableAutoFetch: true, disableStream: true, });
initially, it will send a couple of chunk requests and display the first page. I can easily skip to the next few pages. If I jump to a far-off page, however, it will as expected have to request the byte range associated with that part of the document. What I see is that it is requesting every single chunk between the beginning and the section I jumped to rather than just requesting the byte range that corresponds to that page.
How can I ensure that when I go to a page, it only requests the bytes it needs to display said page?
I have a pretty standard implementation but figure I'd provide it anyway:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using pdfjs to get some huge documents (over 50,000 pages). I have a server setup to accept range requests to make this more efficient. I have my call to getDocument setup as such:
const loadingTask = pdfjsLib.getDocument({ url: url, disableAutoFetch: true, disableStream: true, });
initially, it will send a couple of chunk requests and display the first page. I can easily skip to the next few pages. If I jump to a far-off page, however, it will as expected have to request the byte range associated with that part of the document. What I see is that it is requesting every single chunk between the beginning and the section I jumped to rather than just requesting the byte range that corresponds to that page.
How can I ensure that when I go to a page, it only requests the bytes it needs to display said page?
I have a pretty standard implementation but figure I'd provide it anyway:
Beta Was this translation helpful? Give feedback.
All reactions