janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
13.17k stars 1.41k forks source link

PDF reader does not work as expected #3213

Open dr400 opened 3 weeks ago

dr400 commented 3 weeks ago

Hi everyone,

Sth strange in the neighborhood ... of calibre-web (latest version hosted on docker container)

When reading pdf or epub from the site itself, page opens and download starts but after a few seconds, it stops and only a few pages of the pdf or epub are available (others are "present" but blank or black).

Repeating the process can sometime lead to a complete and satisfactory achievement but not always, even rarely.

I've noticed also that the non-completion (sorry my English) of the process will lead the browser to try to redo it, thus the document is loaded pieces by pieces.

TBN : the download button works strangely too. Refresh has to be commanded many times before it actually starts. (web page not found and then, after a quite numerous refreshment of the page, miraculously it downloads the pdf/epub)

Was working flawlessly with previous versions. Thx for your input.

image

OzzieIsaacs commented 3 weeks ago

The pdf is loaded in pieces page by page. Some people thought this would be a good idea. Epubs don't show this behavior. Be patient. Your screenshot shows that the next page is loaded.

https://github.com/user-attachments/assets/e2a84323-b2dd-4c43-9682-a575c56931ed

OzzieIsaacs commented 3 weeks ago

I can't reproduce the behavior for the download. I think this is a problem in your installation

dr400 commented 3 weeks ago

https://github.com/user-attachments/assets/ad83c52a-ab51-4a22-895a-243235386b8e

log.txt

The pdf is loaded in pieces page by page. Some people thought this would be a good idea. Epubs don't show this behavior. Be patient. Your screenshot shows that the next page is loaded.

pdf_reader.mp4

Thanks for your reply.

The screenshot shows that pages are loaded randomly. Previous versions were loading the docs straight and in one shot ! See video (it takes ages to display further pages if none at all). I have to refresh page otherwise scrolling down will not refresh on its own. I'm not complaining, I just want to make sure that i'm not missing sth. My version of calibre-web is latest.

The calibre library (books shelves) is in a folder within its own container (no sharing on remote hdd). The database is in the very same folder.

To avoid error 500 when calibre (library and/or database) is updated and calibre-web user is consulting calibre library, I'm copying the database (only the metadata.db file) in the calibre-web own container when calibre library is updated. Calibre library being shared btw calibre and calibre-web containers.

Therefore, calibre-web is using calibre library but its own metadata.db file (as this functionnality is available in the calibre-web settings).

Am I doing sth wrong here ? Do you preconise another process ?

One more question, when calibre library is updated, will calibre-web automatically take new addings into account (considering that the metadata.db is updated as well) ? Or does it have to be reloaded (stop and restart cps.py) ?