3

Today i tried to search a Arabic word in a PDF file that contained Arabic content.

All PDF reader soft wares cannot search any Arabic word in this PDF file.

So I dragged PDF file into Firefox browser and selected a area that contained some words by inspect elements and saw this:

hw ½oiC instead of آخرین سخن

What is type of the encoding used in this PDF file? how can i encode this to normal text?

1
  • If copy&paste results in "hw ½oiC", the document must likely does not contain the information required for text extraction. The encoding may well be an arbitrary ad-hoc encoding.
    – mkl
    Jul 20, 2018 at 15:44

1 Answer 1

3

It's difficult to comment on the file you are looking at without seeing it but a good starting point is to try Acrobat and by either copying the text and pasting it into a text editor or doing a search for the text content will reveal if it can be extracted correctly or not.

If it can't be extracted properly then there's a good chance the font is lacking a ToUnicode entry (see Section 9.10.1 of the ISO PDF 32000-1:2008 specification for more information).

1
  • 1
    Strictly speaking a ToUnicode is only one way to make text extraction possible. Other ways include using a predefined Encoding or ROS or using marked content with ActualText entries.
    – mkl
    Jul 21, 2018 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.