calibre-web icon indicating copy to clipboard operation
calibre-web copied to clipboard

page slice loading

Open fyhkimyon opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. When the book I upload is too large, my server will take a long time to load it, and I must wait for the whole file to load before I can display all the contents. I hope that every time I load a page of PDF, this page will be displayed.

Describe the solution you'd like use pdf.js

Describe alternatives you've considered none.

Additional context none.

fyhkimyon avatar Sep 05 '22 14:09 fyhkimyon

The Mozilla reader is already used: https://github.com/janeczku/calibre-web/blob/master/cps/static/js/libs/pdf.js The pdf in use, has to support this feature also

OzzieIsaacs avatar Sep 05 '22 15:09 OzzieIsaacs

I updated pdf.js to a more recent version in the nightly version of calibre-web, please feel free to test it (I don't expect any change)

OzzieIsaacs avatar Sep 06 '22 16:09 OzzieIsaacs

I used the latest docker image (7 hours ago) to test it. pdf.js seems to work only after the backend loads all the resources. When I quickly switch the page at the browser, the page shows a short loading animation. I think it may be necessary to write the logic code of related page slice in the backend, and the frontend requests the backend page by page, otherwise, no content will be displayed on the page until the server completely transmits the entire resource to the browser.

fyhkimyon avatar Sep 06 '22 17:09 fyhkimyon