Bug 412957 - Review tools not working properly with DjVu files
Summary: Review tools not working properly with DjVu files
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: DjVu backend (show other bugs)
Version: 1.8.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-15 07:19 UTC by Iyán Méndez Veiga
Modified: 2019-10-16 11:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshots (1.24 MB, application/gzip)
2019-10-15 07:19 UTC, Iyán Méndez Veiga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iyán Méndez Veiga 2019-10-15 07:19:30 UTC
Created attachment 123194 [details]
Screenshots

SUMMARY

When using highlighter with a djvu file, selected area is displaced after releasing the click. Please see screenshots to better understand what I mean. I can confirm that few months ago this was not happening, so probably this bug was introduced in later versions.

Save file as .okular file before adding any annotation does not solve the problem.


STEPS TO REPRODUCE
1. Open a djvu file
2. Try to highlight some text
3. Annotation is displaced to bottom a few lines


SOFTWARE/OS VERSIONS
Linux: 5.3.5
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.13.1

ADDITIONAL INFORMATION

Only difference that I can think of from the past is that now I am using a hidpi  monitor and I have activated a 1.5x scale in KDE settings.
Comment 1 Oliver Sander 2019-10-15 08:13:38 UTC
That scale factor 1.5 could well be the source of your problem.  Could you set the scaling to 1.0 and see if the problem persists?
Comment 2 Albert Astals Cid 2019-10-15 19:09:51 UTC
What Oliver said
Comment 3 Iyán Méndez Veiga 2019-10-16 06:29:38 UTC
Yes, with scaling 1.0 it works fine.
Comment 4 Iyán Méndez Veiga 2019-10-16 07:22:50 UTC
But only with djvu files. Annotations in pdfs with 1.5x works fine.
Comment 5 Oliver Sander 2019-10-16 08:46:22 UTC
Actually the bug is not particular to djvu files.  I get the same behavior with plain text files, too.
Comment 6 Oliver Sander 2019-10-16 11:22:11 UTC
... and the problem happens with different annotation tools, too.

For example, with line annotations.  That's because the calculations in LineAnnotationPainter (pagepainter.cc:990ff) are not taking the device pixel ratio into account.