Created attachment 116312 [details] A PDF file that can be used to see the bug SUMMARY When "copying and pasting": Okular prints line breaks that don't really exist, and therefore some lines are "broken" :( There are problems copying and pasting from a PDF file to e.g. a text editor, or a terminal emulator. I attach the PDF file, and the ODT source file. The problem doesn't happen using Adobe Acrobat. STEPS TO REPRODUCE 1. Open the pdf file. 2. Copy the text. 3. Paste the text in a text editor. OBSERVED RESULT (the text after copying and pasting from the PDF file to a text editor or a terminal emulator) ZERO*) echo "0";; *ONE\ TWO\ *) echo "1 2" ;; *ONE\ THREE\ *) echo "1 3" ;; *ONE\ FOUR\ *) echo "1 4" ;; ONE*) echo "1" ;; EXPECTED RESULT ZERO*) echo "0";; *ONE\ TWO\ *) echo "1 2" ;; *ONE\ THREE\ *) echo "1 3" ;; *ONE\ FOUR\ *) echo "1 4" ;; ONE*) echo "1" ;; SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.13.5 KDE Frameworks Version: 5.5.0 Qt Version: 5.11.1 ADDITIONAL INFORMATION The bug is seen under Kubuntu 18.10, using 0.6.5 PDF engine, and libpoppler 0.58.0... but the same happens using Kubuntu 14.04 (yes, from 2014)).
Created attachment 116313 [details] The source file that can be used to create the pdf file that was attached previously
Steps taken to reproduce * Open attached PDF file * Select all text with mouse using selection tool, copy to clipboard * Paste in text editor (Kate) * Observed results contains additional line breaks Alternatives investigated * Open attached PDF file * Select all text with "Ctrl + A", copy to clipboard * Paste in text editor (Kate) * Observed results contains additional line breaks * Open attached ODT file * Select all text with mouse using selection tool, copy to clipboard * Paste in text editor (Kate) * Observed results match the contents of the original file, no extra line breaks * Open attached ODT file * Print to PDF * Open resulting PDF * Select all text with mouse using selection tool, copy to clipboard * Paste in text editor (Kate) * Observed results match the contents of the original file, no extra line breaks * Open PDF file in different PDF viewer (Chrome browser default viewer) * Select all text with mouse using selection tool, copy to clipboard * Paste in text editor (Kate) * Observed results match the contents of the original file, no extra line breaks It is perhaps worth noting, that when selecting only a subset of the text with the mouse tool, the phantom line breaks can be seen through the number of characters reported selected by Okular. For instance selecting "ONE*" in the last line reports 4 characters, but selecting "ONE*)" reports 6. I'm not the developer, updating as part of the Okular Bug Day for the Bugsquad. Application Version: 1.5.3 KDE Plasma Version: 5.14.3 KDE Frameworks Version: 5.52.0 Qt Version: 5.11.2
Note: The bug still happens using Okular 1.9.3 (with KDE Plasma 5.18.5 and Kubuntu 20.04).