When I copy, let's say, a line from a PDF it also copies a newline which is copies over to clipboard/Klipper. I then have to delete this newline in whichever external application I copy the text. Reproducible: Always Steps to Reproduce: 1. Copy a line from PDF in Okular 2. 3. Actual Results: Copies a newline along with the text Expected Results: Copy the text but not the newline
Created attachment 90426 [details] Problem screencast
Created attachment 90427 [details] Sample PDF If you copy a line until its end, it will add a newline. If you copy a text which is in middle of other text it won't copy newline.
as this is different then the usual way copy works in KDE I would agree that this is a bug (imo)
Created attachment 90535 [details] another example As you can see even when you copy a single line it adds them as new line.
Confirmed here. Same line in same pdf creates new line in Okular but not in evince Document Viewer.
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.
(In reply to Justin Zobel from comment #6) > As this report hasn't seen any changes in 5 years or more, we ask if you can > please confirm that the issue still persists. The problem still persists. It is an annoying behaviour that often disturbs me as well, e.g. when copying single-line passwords, invoice numbers or other strings from PDF files.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/478
Git commit 376925a10d3ec125ab09d7a7f8fdbcb58e788f09 by Albert Astals Cid. Committed on 09/09/2021 at 17:33. Pushed by aacid into branch 'release/21.08'. Remove \n if it's the last char of the selected text M +3 -3 autotests/parttest.cpp M +4 -0 part/pageview.cpp https://invent.kde.org/graphics/okular/commit/376925a10d3ec125ab09d7a7f8fdbcb58e788f09