public function getContent($file)
    {
        // create the tempfile which will contain the content
        $tempFileName = GeneralUtility::tempnam('doc_files-Indexer');

        // Delete if exists, just to be safe.
        @unlink($tempFileName);

        // generate and execute the pdftotext commandline tool
        $fileEscaped = CommandUtility::escapeShellArgument($file);
        $cmd = "{$this->app['catdoc']} -s8859-1 -dutf-8 $fileEscaped > $tempFileName";
        CommandUtility::exec($cmd);

        // check if the tempFile was successfully created
        if (@is_file($tempFileName)) {
            $content = GeneralUtility::getUrl($tempFileName);
            unlink($tempFileName);
        } else {
            return false;
        }

        // check if content was found
        if (strlen($content)) {
            return $content;
        } else {
            return false;
        }
    }
public function getContent($file)
    {
        // create the tempfile which will contain the content
        $tempFileName = GeneralUtility::tempnam('doc_files-Indexer');

        // Delete if exists, just to be safe.
        @unlink($tempFileName);

        // generate and execute the pdftotext commandline tool
        $fileEscaped = CommandUtility::escapeShellArgument($file);
        $cmd = "{$this->app['catdoc']} -s8859-1 -dutf-8 $fileEscaped > $tempFileName";
        CommandUtility::exec($cmd);

        // check if the tempFile was successfully created
        if (@is_file($tempFileName)) {
            $content = GeneralUtility::getUrl($tempFileName);
            unlink($tempFileName);
        } else {
            return false;
        }

        // check if content was found
        if (strlen($content)) {
            return $content;
        } else {
            return false;
        }
    }
public function getContent ( $ file ) { // create the tempfile which will contain the content $ tempFileName = GeneralUtility :: tempnam ( 'doc_files-Indexer' ) ; // Delete if exists, just to be safe. @ unlink ( $ tempFileName ) ; // generate and execute the pdftotext commandline tool $ fileEscaped = CommandUtility :: escapeShellArgument ( $ file ) ; $ cmd = "{$this->app['catdoc']} -s8859-1 -dutf-8 $fileEscaped > $tempFileName" ; CommandUtility :: exec ( $ cmd ) ; // check if the tempFile was successfully created if ( @ is_file ( $ tempFileName ) ) { $ content = GeneralUtility :: getUrl ( $ tempFileName ) ; unlink ( $ tempFileName ) ; } else { return false ; } // check if content was found if ( strlen ( $ content ) ) { return $ content ; } else { return false ; } }
get Content of DOC file
@param string $file
@return string The extracted content of the file
get Content of DOC file