protected function prepareCommand($filename, $saveToFile, $pdfIsTemp = false)
    {
        $resultIsTemp = false;
        $command = new Command();
        $command->setPdfFile($filename, $pdfIsTemp);
        if ($saveToFile === null) {
            $saveToFile = tempnam(sys_get_temp_dir(), 'pdfbox');
            $resultIsTemp = true;
        }
        $command->setTextFile($saveToFile, $resultIsTemp);
        return $command;
    }
protected function prepareCommand($filename, $saveToFile, $pdfIsTemp = false)
    {
        $resultIsTemp = false;
        $command = new Command();
        $command->setPdfFile($filename, $pdfIsTemp);
        if ($saveToFile === null) {
            $saveToFile = tempnam(sys_get_temp_dir(), 'pdfbox');
            $resultIsTemp = true;
        }
        $command->setTextFile($saveToFile, $resultIsTemp);
        return $command;
    }
protected function prepareCommand ( $ filename , $ saveToFile , $ pdfIsTemp = false ) { $ resultIsTemp = false ; $ command = new Command ( ) ; $ command -> setPdfFile ( $ filename , $ pdfIsTemp ) ; if ( $ saveToFile === null ) { $ saveToFile = tempnam ( sys_get_temp_dir ( ) , 'pdfbox' ) ; $ resultIsTemp = true ; } $ command -> setTextFile ( $ saveToFile , $ resultIsTemp ) ; return $ command ; }
Factory method for Command object

@param string $filename   Path to input file
@param string $saveToFile Path to output file or null if file should not be saved
@param bool   $pdfIsTemp  True if given PDF is a temporary file. Default: false
@return \SGH\PdfBox\Command
Factory method for Command object