koreader / koreader

An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices
http://koreader.rocks/
GNU Affero General Public License v3.0
16.95k stars 1.27k forks source link

Highlights in PDF render solid black in Evince/Zathura PDF readers #5010

Open nimarb opened 5 years ago

nimarb commented 5 years ago

Issue

Highlights created in KOreader render solid black in a few other PDF viewers namely: Evince (3.28.4), Zathura (0.3.8, pdf-poppler 0.2.8) on Ubuntu 18.04.

They render fine (yellow) on Adobe Acrobat DC and PDF X-Change Viewer on Windows 10 and in pdf.js (Firefox, also on Ubuntu).

I'm not well versed in the PDF specs, so it might very well be that the fault is entirely on Evince/Zathura for not implementing it completely/incorrectly. In this case, please close the issue...

Steps to reproduce

  1. highlight a section in a PDF in KOreader
  2. save the PDF
  3. view the saved file in Evince/Zathura
Frenzie commented 5 years ago

This may have changed in newer MuPDF, but either way it would strongly surprise me if it weren't per-spec. ;-)

(Incidentally, I believe Zathura also has a MuPDF backend.)

Cross-ref to MuPDF 1.13 → 1.14/1.15 update: https://github.com/koreader/koreader-base/pull/762

bradmont commented 4 years ago

This also happens when opening the pdf in Okular (using koreader 2020.04.1), which is a shame since I use okular extensively in a research context. I gave Xournal a try and it also seems to have the same problem.

Just spitballing here, but maybe having an option to underline instead of highlighting would be a workaround?

pazos commented 4 years ago

Highlights made with KOReader are visible in both MuPDF and PDF.js (google chrome, polar bookshelf ...).

2020-04-28_17-14

They're also displayed on some mobile apps like MoonReader (android) or GoodReader (iOS).

What seems impossible is to succesfully remove a highlight once it was saved to the file :/

benoit-pierre commented 5 months ago

With our updated MuPDF (1.24.2), testing with test/paper.pdf:

Viewer KOReader highlights shown?
Chromium (126.0.6478.114) yes
Deepin-Reader (5.10.29) yes
Evince (46.3) no¹
Firefox (128.0b7) yes
Ghostscript (10.03.1) yes
MuPDF (1.24.3) yes
Okular (24.05.1) no¹
Xpdf (4.05) no¹
Xreader (4.2.1) no¹
Zathura (0.5.6) with zathura-pdf-mupdf (0.4.3) yes
Zathura (0.5.6) with zathura-pdf-poppler (0.3.2) no¹

Basically: all poppler based readers don't show highlights.

benoit-pierre commented 5 months ago

But at least they don't render solid black anymore. ;)

benoit-pierre commented 5 months ago

Note: it's the same no matter the style (underline, strike-through, …).