Yui Hiroaki 写道:
Thank you for your quick reply.
I succesfully get text from pdf. But this text include error messages.
I do not want these error messages. How can I ignore these error.
I knew it is font problem. Do you know how to retrieve error using
pdftotext option? my platform is debian
if there is only English word inside pdf, I can retrieve
text from pdf, but there are involved Japanese text inside
pdf, I got error and can not retrieve any text from pdf.
I would like to retrieve text from pdf. It is not necessarey to
retrieve Japanese text.
Thank you for your quick reply.
I succesfully get text from pdf. But this text include error messages.
I do not want these error messages. How can I ignore these error.
I knew it is font problem. Do you know how to retrieve error using
pdftotext option? my platform is debian linux.
$handle =
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 =
Thank you for your quick reply.
So I try to rewrite code again below;
$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!
Yui
Micah Stevens wrote:
Just read the
Well, of course, this assumes that your pdftotext program is located
at /usr/bin/. You're getting some error, and stderr is not being shown using
this. Change the line to this:
$handle = popen(/usr/bin/pdftotext \$original_name\ - -layout 21, 'r');
That 'should' redirect stderr to the fread
Actually, this also assumes you're on a *nix type server. If you're running on
windows, you likely won't ever get this to work unless you compile pdftotext
using cygwin, and install it that way, which considering your skill level,
may be a bit much.
Otherwise I'm not sure I know of a windows
I would like to retrieve text from pdf. So I try to comand pdftotext at
xpdf command.
How can I write code?
ex;
?php
$original_tmp = $_FILES['UploadedFile']['tmp_name'];
$original_name = $_FILES['UploadedFile']['name'];
$fileHandle = fopen($original_tmp, r);
$uu=exec('pdftotext