PDA

View Full Version : Pstotext problem!!!!!


mario
03-12-2004, 09:18 AM
hello!!!

i have a several problem with the index the pdf files. i follow all instructions in external binaries thread but not find the apropiate solution, i install the phpdig follow the instructions but i dont find the error.

any ideas for solution the problem??

mi machine is a redhat 9

thanks

Mario

Charter
03-12-2004, 09:50 AM
Hi. Do you have Ghostscript installed? What do you get when you try to run pstotext on a PDF from the command line?

mario
03-12-2004, 10:38 AM
the pstotext run very well in shell

Charter
03-12-2004, 10:52 AM
Hi. What version of PHP are you running? When you run pstotext does the text show in the command window? Also, how did you set the following?

define('PHPDIG_INDEX_PDF',false);
define('PHPDIG_PARSE_PDF','/usr/local/bin/pstotext');
define('PHPDIG_OPTION_PDF','-cork');

mario
03-12-2004, 11:05 AM
define('PHPDIG_INDEX_PDF',true); -> for activate the module
define('PHPDIG_PARSE_PDF','/usr/local/bin/pstotext');
define('PHPDIG_OPTION_PDF','-cork');

Charter
03-12-2004, 11:17 AM
Hi. What version of PHP are you running? When you run pstotext does the text show in the command window?

mario
03-12-2004, 11:26 AM
yes i show the text result my php version is 4.2.2

Charter
03-12-2004, 11:32 AM
Hi. PHP 4.2.2/3 seems to have problems dealing with external binaries. Upgrading your PHP should solve the problem. If you don't want to upgrade, then try the code posted in this (http://www.phpdig.net/showthread.php?threadid=570) thread.

mario
03-12-2004, 12:59 PM
ups!! dont work!!!

Charter
03-12-2004, 03:01 PM
Hi. Are the directories to pstotext, and the pstotext file, all set to 755 permissions? What happens when you run the following from the command line?

/usr/local/bin/pstotext -cork filename.pdf

mario
03-15-2004, 05:37 AM
yes all directories and archive that depent the pstotext have a 755 permissions, when me execute the command

pstotext -cork Reader.pdf -> this is a demo archive of acrobat reader.

the content of the archive is show in the console!!!

the pstotext run very well!!!

thanks

Mario

Charter
03-15-2004, 12:17 PM
Hi. What version of PhpDig are you using? Just to be sure, is /usr/local/bin/pstotext the correct path?

Also, try doing as in this (http://www.phpdig.net/showthread.php?threadid=522) thread. What onscreen output do you get?

mario
03-15-2004, 01:38 PM
not my pstotext is located in /usr/bin/pstotext and on the configuration file i put this path. the output is the all contained of the archive.

Charter
03-23-2004, 06:50 AM
Hi. Did you happen to echo stuff as in this (http://www.phpdig.net/showthread.php?threadid=522) thread? If so, what did you get?

Hoek
03-24-2004, 04:16 AM
I have had the same problem with pstotext. But when we upgraded our system from kernel 2.2.14-5.0 to 2.4.25 on a Linux system all problems with external binaries (also pdftotext) disappeared! By the way: I foud out that pdftotext is a bit faster, you do not need to install ghostscript and the recognized words are more. Just do a full install of xpdf (not only the pdftotext-file).