Bug 287457

Summary: EPUB document gets messy when highlighting text
Product: [Applications] okular Reporter: a12134653
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: fabiodurso, mamun.nightcrawler
Priority: NOR    
Version: 0.13.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description a12134653 2011-11-24 12:12:05 UTC
Version:           0.13.2 (using KDE 4.7.3) 
OS:                Linux

When I highlight a word in an EPUB document, as soon as the mouse button is released, the page gets completely messy, similar to as if you printed a page 10 times over and over on the same page in your printer.

If I zoom in or zoom out some times it may come back to normal, but as soon as I scroll up or down the page, it gets messy again. The more I scroll the page, the messier it gets. The other pages seem not to be affected at all, eg: if I scroll 2 pages then they are okay, but when I come back to the original page, it is still messy.

When you delete the highlighted word, everything comes back to normal.

This only happens with epub format, pdf is okay.

Reproducible: Always

Steps to Reproduce:
1) Open an EPUB document.
2) Press F6 (annotation options will pop up).
3) Choose 4th option (Yellow highlight).
4) Highlight any word. You will see the results. The page gets messy. If you scroll the page, things get even messier. Zoom in or out two or three times and the text is readable again. Scroll after zooming and things get messy again.
5) Click with the right button on the highlighted word and delete the highlight. Things get back to normal.

Actual Results:  
Total mess. As if you printed the same page 10 times over and over again on the same page in your printer.

Expected Results:  
It should have just highlighted the word without messing the text of the whole page.

I've tested with EPUB and PDF formats. It only happens with EPUB; PDF is okay.

I'm also using Okular 0.13.3 from ArchLinux repository, under x86_64.
Comment 1 Mohammad Mahfuzur Rahman Mamun 2011-11-24 12:41:51 UTC
The problem you are telling was in okular. Not only epub but also odt format also suffers from this problem. This is actually related with transparency. In time of my GSOC project, I made a workaround, which is better than what you are seeing. It still has some problems while making text selection.

Can you test it with the okular master code? You can download it from: http://okular.kde.org/download.php.
Comment 2 a12134653 2011-11-24 18:29:14 UTC
Hello Mohammad!

>I made a workaround, which is better than what you are seeing.

What do you mean by that? Did you make a patch to solve it? If so, where can I find it?

>Can you test it with the okular master code? You can download it from:
>http://okular.kde.org/download.php.

I downloaded Okular from Arch Linux repository, which I think is the latest version. (I'm using 0.13.3, developed using KDE 4.7.3)
Comment 3 Albert Astals Cid 2011-11-24 19:03:46 UTC
His fix is only in what will be KDE 4.8, that's why he asked you to use the download page to try the not released version of the code from git. But of course you need to be a bit tech-y to know how to do it.

Please attach a screenshot of the problems you get.
Comment 4 Fabio D'Urso 2014-05-08 14:45:56 UTC
It seems to work now. Please reopen this bug if you can reproduce it with Okular >= 0.19.0 (KDE >= 4.13.0).
Thanks for caring about Okular :)