Kareadita / Kavita

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
http://www.kavitareader.com
GNU General Public License v3.0
6.25k stars 324 forks source link

When it opens some PDF, the contents are white #1982

Closed UlyssesZh closed 3 months ago

UlyssesZh commented 1 year ago

When I use Kavita reader to read PDF files, most times it works great, but sometimes the pages of the PDF just appear white and I cannot read: image

The phenomena is readily reproduced on these clients (not server): Chrome 113.0.5672.63 (on Ubuntu 20.04 desktop), Firefox 113.0.5672.63 (on Ubuntu 20.04 desktop), Chrome 113.0.5672.76 (on Android 11), Firefox 112.2.0 (on Android 11).

Server info:

The PDF in problem is already sent to @majora2007 by Discord DM.


This is not a problem of pdf.js. Steps taken to try to reproduce on pdf.js:

  1. git clone https://github.com/mozilla/pdf.js.git (commit: 9417a37);
  2. put the PDF that Kavita opens white into the pdf.js dir;
  3. gulp server;
  4. open the PDF, and it looks fine.

This is not a problem of ngx-extended-pdf-viewer. Steps taken to try to reproduce on pdf.js:

  1. ng new test-ngx and cd test-ngx;
  2. ng add ngx-extended-pdf-viewer (installs ngx-extended-pdf-viewer 17.0.0-alpha.4);
  3. add an app-example-pdf-viewer component;
  4. in the code of example-pdf-viewer.component, change the src of the PDF file to the PDF that Kavita opens white;
  5. ng s;
  6. open the PDF, and it looks fine.
TinyLexy commented 1 year ago

Adding to this per request: I'm having an issue with a PDF that I was not experiencing on 0.7.1.4. There are backgrounds behind the text that display fine however the text on some pages look like the text is blurred/smudged off. It's not every page, just some. Have verified that it looks fine while viewing in Firefox (113.0), Chrome (v113.0.5672.93) and adobe reader. I'm using kavita v7.2 from docker hub (2nd update that was pushed). Pages affected is a long list so will just add a few examples: 24, 30, 41, 60, 120, etc.

Issue Link: https://github.com/Kareadita/Kavita/issues/1990 The PDF in question is already sent to @majora2007 by Discord DM.

majora2007 commented 1 year ago

I was able to reproduce this in Kavita on the file in question.

sulisu commented 1 year ago

Kavita v0.7.6.0, same program with the pdf attached.

glassbook1.pdf

majora2007 commented 1 year ago

I took a look from the book sulisu provided and this looks to be an issue with https://github.com/stephanrauh/ngx-extended-pdf-viewer library. I will create an issue on their Github when I have a chance.

majora2007 commented 1 year ago

Okay in submitting the fix, I do see their latest beta release actually fixes this issue, so I'm going to update to that for now. It seems stable.

majora2007 commented 1 year ago

Sorry about that. This is fixed in the latest pdf viewer, but that beta version is too buggy to bring into Kavita. So I'll leave this issue and hopefully it will be wrapped up and stable for consumption.

DieselTech commented 3 months ago

@UlyssesZh @sulisu This issue is quite old now and the version of the pdf viewer shipping with Kavita has changed quite a bit since these tickets were opened. I don't have the file UlyssesZh was having an issue with, but I was able to confirm the file sulisu provided works in the latest version of Kavita.

If your still having issues please open a new ticket so we can track it.