audiobookshelf
audiobookshelf copied to clipboard
[Bug]: PDF Reader is flickering
Describe the issue
The PDF reader flickers on each page change, which makes using it rather uncomfortable. The page number also flickers and the green loading bar is rather distracting.
This does not seem necessary since the page is rendered, then white, then rendered again. Is the first render lower resolution? Would it be possible to not render a white "frame" in between (and remove the loading bar) to make it less jaring?
Steps to reproduce the issue
- Open a PDF ebook
- Flip through pages
Audiobookshelf version
v2.5.0
How are you running audiobookshelf?
Docker
This might be entirely due to the PDF Viewer Library used which appears to be rather unmaintained. Perhaps switching to something like https://github.com/TaTo30/VuePDF might resolve the issue.
Thanks, the codebase isn't using Vue3 yet
I see, I should have checked. Are there any plans to migrate to Vue 3 as Vue 2 seems to reach its EOL?
Yeah but there is no rush to migrate before the EOL. I want to migrate mostly so we can handle subfolder path support for reverse proxies.
I see, makes sense. For Vue 2 https://www.npmjs.com/package/pdfvuer looks rather compelling (demo) and has a similar programming interface to what is currently used, though a feature to only show a single page at a time does not seem available.
After testing it out for a bit, it seems like pdfvuer would basically be a drop-in replacement without any of the issues. I can create a pull request, however my CSS / styling knowledge is quite limited, so somebody else might need to have a look at that afterwards.
What's the current status on this issue? I am experimenting this bug a lot myself.
Would love to contribute for this issue to be fixed ❤️
The linked PR is functional. Feel free to test it out and improve upon it, if you notice something that could be better!
I am on 2.8.1 installed on Debian 12. Mine doesn't flicker, but after a few pages, the page turned dark and the turn pages become unresponsive.
The flickering is fixed now so I don't think the other PDF reader library is necessary at this time.
Sounds good to me. The landscape of Vue 2 PDF libraries is rather abandoned as a whole unfortunately.
Fixed in v2.11.0