Hello All, I am using xelatex for processing hindi and sanskrit text in devanagari script. While the resulting pdf displays devanagari correctly, it does not have the correct devanagari text layer, hence it can not be used for searching or extracting the text. The result also changes based on the devanagari font used.
I wanted to know if there are any options that I can set in the xetex source file to get better result. ---MWE -- \documentclass[12pt]{article} \usepackage{fontspec} \pagestyle{empty} \def\sampletext{आप अभी देखते हैं कि एक अकेला उड़ता हुआ पक्षी गीत गाना आरंभ कर रहा है। महिलाओं को देखते हुए दूसरी औरतें ऑफ़िस की ओर जाने पड़ी। श्री गणेशाय नमः।} \parskip\baselineskip \def\dvng #1{{\fontspec[Script=Devanagari]{#1}\sampletext\par}} \pagestyle{empty} \begin{document} \dvng{Sanskrit 2003} \dvng{Siddhanta} \dvng{Uttara} \dvng{Nakula} \dvng{Sahadeva} \end{document} ------ Here is the text copied from the pdf created by xelatex, viewed in Foxit pdf reader.. --- आप अभी दे खत े ह िक एक अक े ला उड़ता आ पी गीत गाना आरं भ कर रहा है । मिहलाओ ंको द े खत े ए सरी औरत ऑिफ़स की ओर जान े पड़ी। ौी गण े शाय नमः। अाप अभी देखते है ं क एक अके ला उड ़ता अा पी गीत गाना अारंभ कर रहा है। महलाअाे ं काे देखते ए दू सर अाैरते ं अाॅफ ़ स क अाेर जाने पड ़। ी गणेशाय नमः। आप अभी देखते हैं क एक अके ला उड़ता ْआ प€ी गीत गाना आरं भ कर रहा है। म हलाओं को देखते ْए द ू सर) औरतें ऑ फ़स क, ओर जाने पड़)। Ôी गणेशाय नमः। आप अभी दे खते हӔўक एक अक े ला उड़ता हु आ प̯ी गीत गाना आरं भ कर रहा है । मўहलाओं को दे खते हु ए द ू सरҰ औरतӒ ऑўफ़स कҴ ओर जाने पड़ी। ौी गणे शाय नमः। आप अभी दे खते हӔ ўक एक अक ेला उड़ता हु आ प̯ी गीत गाना आरं भ कर रहा है । मўहलाओं को दे खते हु ए द ू सरҰ औरतӒ ऑўफ़स कҴ ओर जाने पड़ी। ौी गणे शाय नमः। ---- When I OCR this pdf using tesseract-ocr and create another pdf through that, the text copied in foxit reader from the pdf created by tesseract-ocr does not have the issues with 'maatraas' as in the sample above, but the OCR output is not 100% accurate. See the copied text below... ---- आप अभी देखते हैं कि एक अकेला उड़ता हुआ पक्षी गीत गाना आरंभ कर रहा है । महिलाओं को देखते हुए दूसरी औरतें ऑफिस की और जाने पड़ी । श्री गणेशाय नमः । आप अभी देखते हैं कि एक अकेला उड़ता हुआ पक्षी गीत गाना आरंभ कर रहा है। र्माहरछ।आ को द्खुन्न हुए दूसरी औरत ऑफ़िस की और जाने पड़ी। श्री गणेशाय नमः। आप अभी देखते है कि एक अकेला उडता हुआ पक्षी गीत गाना आरंभ कर रहा है। महिलाओं को देखते हुए दूसरी औरतें ओंफिस्र की और जाने पड़ी। श्री गणेशाय नमः। आप अभी देखते हैं कि एक अकेला उड़ता हुआ पक्षी गीत गांना आरंभ कर रहा है । महिलाओं को द्ररन्नतं हुए दूसरी ओरतंण् ओंफिरों की और जाने पडी। श्री गणेशाय नमः। आप अभी देखते हैं कि एक अकेला उड़ता हुआ पक्षी गीत गाना आरंभ कर रहा है। महिलाओ को देखते हुए दूसरी औरतें आँफ़िस की और जाने पड़ी। श्री गणेशाय नमः। ----------- Is there anyway to improve xetex processing to provide correct devanagari text layer in the pdf for searching and copying? Thanks!! ShreeDevi ____________________________________________________________ भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com On Mon, Dec 8, 2014 at 7:03 PM, ShreeDevi Kumar <shreesh...@gmail.com> wrote: > Is it possible to create searchable pdf for devanagari using xetex? > > Thanks, > > > ShreeDevi > ____________________________________________________________ > भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com >
-------------------------------------------------- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex