3

I have an Arabic PDF, and I want to parse it into text document using Java. I have tried many times, and the English words parse successfully but the Arabic words don't.

Can anyone recommend a solution that will convert the Arabic words properly as well?

4
  • See these: prasannatech.net/2009/01/… Mar 7, 2011 at 9:14
  • 2
    which library are you using to read the pdf file? Mar 7, 2011 at 9:18
  • pdfbox not good for parsing arabic pdf
    – moneera
    Mar 7, 2011 at 9:29
  • i tried pdfbox and iText and Apache plug-ins they not work probably like i want
    – moneera
    Mar 7, 2011 at 9:40

2 Answers 2

2

There are several libraries that come to mind. Apache Tika, iText or pdfbox will all more or less solve your problem. Although, I must put in a word for Tika, as it supports language detection, and can also handle other document types too.

4
  • 1
    i tried all the libraries you mentioned ,they cant parse arabic pdf,apache tika parse arabic but not all the pdf files i think that the pdf is encoded or security on it i cant understand because also when i want to shadow the words it cant shadow it successfully ,pleeeeeeeeeeeease help me
    – moneera
    Mar 7, 2011 at 9:34
  • If a PDF files has the right to extract the text removed (This can be controlled for each file), no software will be able to help you. The current settings of a PDF can be found be opening the file in the Adobe Reader an pressing Crtl-D (or goning to the document properties using the menu).
    – nfechner
    Mar 7, 2011 at 9:47
  • thanx for your help ,but i want to know what is the property i should change in the pdf properties to make it selectable ????
    – moneera
    Mar 7, 2011 at 10:11
  • 1
    In IText you would set the ALLOW_COPY permission using the setEncryption method of PdfWriter. If you are editing existing PDFs that are already encrypted, you need the current password first.
    – nfechner
    Mar 7, 2011 at 10:20
1

I think you can use iText for pdf manipulation using Java. It supports Arabic too.

1
  • i tried iText it create a pdf not convert it to text please if you have ahelp give me
    – moneera
    Mar 7, 2011 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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