Bug 488312

Summary: Text Highlighting: Enable editing of coordinates of the bounding box
Product: [Applications] okular Reporter: Leonard Mada <leo.mada>
Component: generalAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: wishlist CC: aacid
Priority: NOR    
Version First Reported In: 23.08.5   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Leonard Mada 2024-06-10 17:04:27 UTC
SUMMARY
The size of the bounding box when highlighting text inside a pdf-document is sometimes wrong.

The top and bottom boundaries are most-commonly affected. The left/right boundaries are sometimes affected as well (severly affected).

SOLUTION
Enable the editing of the coordinates of the bounding box.


STEPS TO REPRODUCE
1. Open certain pdfs (I can provide an example)
2. Highlight certain text-sections

OBSERVED RESULT
Case 1: Bounding box extends way beyond the last word (covering even part of the next word).
Case 2: Bounding box extends well beyond the bottom of the words (at least 2x as high as the actual words).


EXPECTED RESULT
Solution 1: compute more robustly the bounding box (but problems may still appear).
Solution 2: allow users to change manually the coordinates of the bounding box, e.g. in the properties window.


SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
Can provide example pdfs.

Solution 2 would allow to manually correct the bounding box. The coordinates could be displayed in the properties window (only in the case of a simple rectangular area). More complex areas could be covered in future issues.