Discussion:
[okular] [Bug 401044] New: When "copying and pasting": Okular prints line breaks that don't really exist, and therefore some lines are "broken" :(
Ganton
2018-11-14 20:02:20 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=401044

Bug ID: 401044
Summary: When "copying and pasting": Okular prints line breaks
that don't really exist, and therefore some lines are
"broken" :(
Product: okular
Version: 1.4.3
Platform: Ubuntu Packages
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: PDF backend
Assignee: okular-***@kde.org
Reporter: ***@gmx.com
Target Milestone: ---

Created attachment 116312
--> https://bugs.kde.org/attachment.cgi?id=116312&action=edit
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)).
--
You are receiving this mail because:
You are the assignee for the bug.
Ganton
2018-11-14 20:04:04 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=401044

--- Comment #1 from Ganton <***@gmx.com> ---
Created attachment 116313
--> https://bugs.kde.org/attachment.cgi?id=116313&action=edit
The source file that can be used to create the pdf file that was attached
previously
--
You are receiving this mail because:
You are the assignee for the bug.
Nate Graham
2018-11-15 22:58:33 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=401044

Nate Graham <***@kde.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@kde.org
--
You are receiving this mail because:
You are the assignee for the bug.
Magnus Aagaard Sørensen
2018-11-17 13:14:36 UTC
Permalink
https://bugs.kde.org/show_bug.cgi?id=401044

Magnus Aagaard Sørensen <***@aagaardsorensen.dk> changed:

What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Keywords| |investigated, triaged
Status|REPORTED |CONFIRMED
CC| |***@aagaardsorensen.dk

--- Comment #2 from Magnus Aagaard Sørensen <***@aagaardsorensen.dk> ---
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
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...