You should try to enable DebugOutput and DebugRedirection to see if something went wrong. In addition, I think you should put the full path to your script in binaryfile.ini.append.php and perhaps try to launch your script on the original PDF file in a shell to check if it's able to extract the text from your PDF, with some weird PDF files, sometimes it fails.
class eZPDFParser
{
function parseFile( $fileName )
{
$binaryINI = eZINI::instance( 'binaryfile.ini' );
$textExtractionTool = $binaryINI->variable( 'PDFHandlerSettings', 'TextExtractionTool' );
// save the buffer contents
$buffer = ob_get_contents();
ob_end_clean();
// fetch the module printout
ob_start();
passthru( "$textExtractionTool $fileName" );
$metaData = ob_get_contents();
ob_end_clean();
// fill the buffer with the old values
ob_start();
print( $buffer );
return $metaData;
}
}
This class runs the script contained in "binaryfile.ini" and retrieves the output stream for the search indexing. There is no help in pdftotext, which tells how to make a direct result. After some research, I found this command: