xpdf and antiword test scripts

xpdf and antiword test scripts.  xpdf is now part of the poppler and poppler-utils packages

<HTML>
<BODY>
<PRE>
<?php
$return_code = 0;
$result = array();

$error = exec(‘/usr/bin/pdftotext /var/www/vhosts/mydomain.com/httpdocs/xpdftest2.pdf’, $result, $return_code);

if ( $return_code != 0 ) {
print(“Error: $return_code\n”);
} else {
$result = implode(“\n”,$result);
print($result);
}
exit(0);
?>
</PRE>
</BODY>
</HTML>

<HTML>
<BODY>
<PRE>
<?php
$return_code = 0;
$result = array();

$error = exec(‘/usr/bin/antiword /var/www/vhosts/mydomain.com/httpdocs/docs/Common\ language.doc’, $result, $return_code);

if ( $return_code != 0 ) {
print(“Error: $return_code\n”);
} else {
$result = implode(“\n”,$result);
print($result);
}
exit(0);
?>
</PRE>
</BODY>
</HTML>

You can leave a response, or trackback from your own site.

Leave a Reply