Bug 326207 - Search algorithm finds a result for "valuesas" when the real text is "values as"
Summary: Search algorithm finds a result for "valuesas" when the real text is "values as"
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.17.60
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
Depends on:
Reported: 2013-10-18 14:47 UTC by Albert Astals Cid
Modified: 2014-02-25 22:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.0

The said pdf (42.52 KB, application/x-download)
2013-10-18 14:49 UTC, Albert Astals Cid

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Astals Cid 2013-10-18 14:47:40 UTC
Searching for "valuesas" in the attached pdf yields a result when it should actually return none.
Comment 1 Albert Astals Cid 2013-10-18 14:49:27 UTC
Created attachment 82927 [details]
The said pdf
Comment 2 Jaan Vajakas 2014-02-15 13:17:49 UTC
After the recent introduction of the feature of using libkscreen, the behavior is also dependent on the display DPI since the layout recognition algorithm rounds coordinates to integers at 100% resolution. With the said PDF, the bug is reproducible e. g. at 72 x 72 dpi.

I posted a patch on KDE Review Board. The patch also removes dependence of layout analysis on display DPI.
Comment 3 Albert Astals Cid 2014-02-15 14:03:27 UTC
Did you assign that patch to the okular group?
Comment 4 Albert Astals Cid 2014-02-15 14:04:01 UTC
Yes you did, ignore me :D
Comment 5 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 331090
FIXED-IN: 4.13.0
REVIEW: 115759

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