tags:

views:

34

answers:

2

I know that there was a few questions about this topic.

I need an framework / script / solution to get plain text from PDF file by php.

Does exist a solution how to get plain text from PDF file?

(And yes, I searched for this hours. This is the last chance).

+1  A: 

On linux system, simply use pdftotext (with shell_exec)

echo `pdftotext in.pdf out.txt`;

PS: Take a look on this article, I don't know if it's useful or not.

Ehsan
And what about commencial webhostings? I cant install linux apps to the server.
Martin
If they didn't disable `shell_exec` function (and it's family), you can simply upload the executable file and run it.
Ehsan
A: 

I believe you might work something out by using the google docs API which handles OCR.

It converts an image to plaintext so you first have to convert the pdf to image with GhostScript and ImageMagick or something else

btrandom