Bug 331090

Summary: Garbled textselection, okular incorrectly assumes two column layout
Product: [Applications] okular Reporter: qqqqqqqqq9
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: aacid
Priority: NOR    
Version: 0.18.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 4.13.0
Attachments: Conflicting pdf-file
Latex-file used to generate the pdf
Screenshot illustrating the garbled selection in okular
Screenshot illustrating the garbled paste in libreoffice

Description qqqqqqqqq9 2014-02-13 10:23:42 UTC
When copying text from a latex-generated pdf, okular treats a one-column text as two column layout. Pasting in libreoffice leads to garbled text. (see screenshots)
Repeating the same task using acroread instead of okular leads to the expected result.
It might be related that the symbols for phone and email cannot be selected (in okular)


Reproducible: Always

Steps to Reproduce:
Does not apply.
Comment 1 qqqqqqqqq9 2014-02-13 10:24:39 UTC
Created attachment 85125 [details]
Conflicting pdf-file
Comment 2 qqqqqqqqq9 2014-02-13 10:26:13 UTC
Created attachment 85126 [details]
Latex-file used to generate the pdf
Comment 3 qqqqqqqqq9 2014-02-13 10:27:29 UTC
Created attachment 85127 [details]
Screenshot illustrating the garbled selection in okular
Comment 4 qqqqqqqqq9 2014-02-13 10:28:33 UTC
Created attachment 85128 [details]
Screenshot illustrating the garbled paste in libreoffice
Comment 5 qqqqqqqqq9 2014-02-13 10:29:24 UTC
Slight changes in the original latex-file cause the problem to disappear.
Comment 6 Albert Astals Cid 2014-02-25 22:59:52 UTC
Git commit a80922d45e66605075a2838ee8836cfe8219bfe7 by Albert Astals Cid, on behalf of Jaan Vajakas.
Committed on 25/02/2014 at 22:57.
Pushed by aacid into branch 'master'.

Improve XY Cut layout recognition code

It was a simple bug in the XY Cut layout recognition code that made it too eager to see columns everywhere.
Also removed the dependence of the layout analysis algorithms on the display DPI (introduced by the recently added feature of using KScreen) to make their behavior more predictable and reproducible.
Related: bug 326207
FIXED-IN: 4.13.0
REVIEW: 115759

M  +45   -31   core/textpage.cpp
M  +147  -101  tests/searchtest.cpp

http://commits.kde.org/okular/a80922d45e66605075a2838ee8836cfe8219bfe7