Bug 491765

Summary: Rotation Bug: Highlighter in non-rotated column covers also the rotated column
Product: [Applications] okular Reporter: Leonard Mada <leo.mada>
Component: generalAssignee: Okular developers <okular-devel>
Status: CONFIRMED ---    
Severity: normal CC: tau0
Priority: NOR    
Version First Reported In: 23.08.1   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: PDF document: page 5 (6) with 2 column layout with different rotations
Screen capture of Bug

Description Leonard Mada 2024-08-15 21:42:19 UTC
Created attachment 172659 [details]
PDF document: page 5 (6) with 2 column layout with different rotations

Rotation Bug: Highlighter in non-rotated column covers also the rotated column

SUMMARY
On page 5 (6) of the attached pdf document is a page with the following layout:
- 1st column: is a rotated table;
- 2nd column is normal text;
When applying the highlighter in the 2nd column over a text-fragment that spans 2 lines of text, the highlight covers also the 1st column.

STEPS TO REPRODUCE
1. Open pdf document;
2. Go to page 5 (or 6);
3. Apply highlighter to a text expression spanning 2 lines of text;

OBSERVED RESULT
The highlight covers also an area in the 1st column: it looks quit ugly, see example highlight in red!

EXPECTED RESULT
Hihghlight only the text in the 2nd column.

SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
This issue is also related to similar issues regarding rotated text, see:
https://bugs.kde.org/show_bug.cgi?id=491459
https://bugs.kde.org/show_bug.cgi?id=334297

However, the issue is this time in the non-rotated column! The page layout is also more complex. The previous issues persist also in this document.

Note:
The highlighting in the tables was done with MS Edge. The areas are NOT perfect -  seems to be character-wise highilighting. MS Edge also overwrote some of the other highlights (and I did not correct back all of these!).
Comment 1 Leonard Mada 2024-08-15 21:43:46 UTC
Created attachment 172660 [details]
Screen capture of Bug
Comment 2 Pablo Alonso 2024-08-16 00:41:04 UTC
Can reproduce the issue in Okular with the given PDF. 
The editor in Firefox (PDF.js) does not exhibit the same behaviour when highlighting the same columns (It respects the rotation of the text) so this is an Okular-specific issue