I use Ember PDFJS addon to render a pdf document. (https://www.npmjs.com/package/ember-pdfjs) It uses byte range request but requests go on for the entire pdf document. I want to preload few pages say 5 at first and then load pages as user requests either by entering the page number or scrolling. How can I do it using byte-range requests? and It should be done on the server side or client side?
Asked
Active
Viewed 250 times
1 Answers
0
PdfJS allows to render only needed pages. However, I'm not sure if it's possible with this ember addon. You can render only needed pages if you create your own component which allows that. I wrote such component in the past, it's not very hard.
As for loading, I think that you need to load the whole file, even if you are going to render only 5 pages.

Gennady Dogaev
- 5,902
- 1
- 15
- 23