Bug 439791 - Text Selection in Okular doesn't grab whitespaces in the beginning and in the end of lines.
Summary: Text Selection in Okular doesn't grab whitespaces in the beginning and in the...
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-13 06:35 UTC by dreamndi
Modified: 2021-07-13 09:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
okular-whitespace-bug (55.40 KB, image/png)
2021-07-13 06:35 UTC, dreamndi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dreamndi 2021-07-13 06:35:20 UTC
Created attachment 140016 [details]
okular-whitespace-bug

SUMMARY
When I use Text Selection, it doesn't select spaces in the beginning and in the end of lines.

STEPS TO REPRODUCE
1. Create or open pdf file with spaces in the beginning and end of lines 
2. Select all text
3. See no spaces

OBSERVED RESULT
No spaces

EXPECTED RESULT
Selected spaces

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE Neon User Edition 5.22 
(available in About System)
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 dreamndi 2021-07-13 06:43:12 UTC
Seems like it's a normal behavior for pdf, when I create a pdf with text, I split text after a whitespace and put it into a pdf file. After saving that space is replaced with paragraph symbol. 

Okay, I think It is not a okular bug. Thanks.
Comment 2 Laura David Hurka 2021-07-13 09:53:21 UTC
This is the text entity reordering problem. Okular just takes an unordered set of visible characters with position, and then arranges them to a string as it feels appropriate. Space characters are indeed lost in this process.