Yui wrote:

> $handle = popen("/usr/bin/pdftotext \"$original_name\" - -layout ",'r');
> $read = fread($handle, 2048000);
> echo $read;
> pclose($handle);
> But I can not see anything!!
> Please do help me!


$tmpfile = '/home/domain/public_html/pdf_files/myfile.pdf';
chmod ($tmpfile, 0777);
$salida = shell_exec("pdftotext /home/domain/public_html/pdf_files/$tmpfile 
2>&1");

Here we assume pdftotext.exe is inside /home/domain/public_html/pdf_files/
Maybe you have this inside /usr/bin... etc. In this case be aware of
the security restrictions in your server when you try to execute a
program outside your secure environment.
If you have these problems then you can put the executable in the
same file's folder. No fear. It works.

Also, you can translate the  pdftotext error codes or messages to
japanese ^_^ 

if (ereg('some words in the console answer', $salida)) {
   print 'my message in jp';
}

etc..

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to