Originally Posted by Jellby
There's no solution guaranteed to work, other than OCR, because a PDF is more concerned about its looks than about the underlying meaning. In some cases, if the PDF font uses some known/standard encoding, you can maybe copy and paste with the right settings, or do a conversion afterwards. You may be lucky, and maybe the PDF encoding is ISCII
(in that case it should be possible to find a converter), but it could be some ad-hoc encoding used only in that particular document.
@Jellyby: your response to is appreciated, i understood that need to cope up with pdf the way it generates text or code. no qualms.