D10298: Fix searching in RTL PDFs

Chfan Zil noreply at phabricator.kde.org
Fri Feb 23 14:27:55 UTC 2018


chfanzil added a comment.


  I tested okular with the patch. I used 2 PDF files in Hebrew. I attached them so others can test. One was downloaded using Wikipedia's Download-as-PDF option. The other was downloaded from random search results, when looking for Hebrew PDFs. 
  F5726742: Open Source (Hebrew Wikipedia).pdf <https://phabricator.kde.org/F5726742>
  F5726741: meida-15.pdf <https://phabricator.kde.org/F5726741>
  
  The results are as follows
  
  1. Okular was able to find the text I was searching for (Success).
  
  2. But it is looking for the text inside each line from **left to right** and not from **right to left** (which is the reading/writing direction). When there is more than one occurrence of the text in the same line, it will find the last one first, and the first one at the end. I'm attaching a gif to illustrate this.
  
  F5726743: Search RTL text in patched Okular.gif <https://phabricator.kde.org/F5726743>
  
  3. I think the problem is caused because Okular treats the whole text as if it is typed backwards. For example, copying text from Okular results in the text being pasted backwards. But when trying to copy the same text from Firefox (when used as a PDF reader) it copies the text correctly. I'm attaching another gif to illustrate this.
  
  F5726746: Okular vs Firefox - copying text.gif <https://phabricator.kde.org/F5726746>
  
  So in regards to usability - the current patch is better than nothing. It enables searching for text that is written in a RTL language and should be adopted.
  
  In general, Okular might need some improvements in regards to RTL languages (Hebrew, Arabic, Persian, Yiddish). According to wikipedia (https://en.wikipedia.org/wiki/List_of_languages_by_total_number_of_speakers), there are more than 550 million speakers of those languages.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10298

To: ngraham, #okular
Cc: chfanzil, ltoscano, michaelweghorn, ngraham, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180223/b812f18b/attachment.html>


More information about the Okular-devel mailing list