Created attachment 68861
find bidirectional text

a small workaround for searching rtl text. limited for mixed directional text.

say ABC 123 will render by fribidi as 123 ABC. 
to search for this text in poppler, you'd need to search literally 123 CBA 
before this patch.
with this patch, search for ABC 123 as entered. nice.
but if you only search for ABC 12, nothing would be found. that's because this 
patch transforms the searched text from logical to visual before the actual 
search in the visual text inside poppler, so ABC 12 would render to 12 CBA, 
that's not there.

there's a better way to go, which i'll implement later. this would also
help with bidi text select and copy.

this patch will only work if you first apply my last patch to bug 55977.
you also need fribidi or preferably icu.

please enjoy.
alex

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to poppler in Ubuntu.
https://bugs.launchpad.net/bugs/127732

Title:
  Searching Hebrew text works in reverse order

Status in Poppler:
  Confirmed
Status in “poppler” package in Ubuntu:
  Triaged

Bug description:
  Hi,

  There is problem searching Hebrew text in pdf files in evince. The
  text I write in the find box is being found in reverse (perhaps in
  visual order), and not in the right order of characters. The searching
  works in Adobe Acrobat, so I'm guessing its not a problem in the pdf
  file itself.

  I'll attach an example pdf.

  Steps to reproduce:
  1. Open the attached pdf.
  2. Search for the word "ידיעון" (The letter "י" is the first in logical 
order). The text is not found in the file.
  2. Search for the reversed word "ןועידי". (The letter "ן" is first in logical 
order). The text is found in reverse in the file.

  Regards,
  Haggai Eran

To manage notifications about this bug go to:
https://bugs.launchpad.net/poppler/+bug/127732/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to