Do you have a comparison of how this approach to doing this in PHP compares with the options from the command line:

http://www.comp.eonworks.com/scripts/convert_pdf_to_text-20040418.html

Seems like it's the same functionality you are trying to emulate for those who don't have root access..

Comments

Saubhagya’s picture

This script is using only ps2ascii command

68 ps2ascii $a > ${a%.*}.txt

And I found at http://linux.about.com/library/cmd/blcmdl1_ps2ascii.htm

"ps2ascii doesn't look at font encoding, and isn't very good at dealing with kerning, so for PostScript (but not currently PDF)"

As this module looks at font encoding and ps2ascii doesn't do that. It may run fine with some PDFs. But this is not general approach.

If I'm missing something, let me know.

mgifford’s picture

I don't know enough about it to discuss in more depth. I just knew about the command line approach and wanted to get feedback on how it differs from what you are doing.

Saubhagya’s picture

Status: Active » Fixed

I think it is fixed now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.