We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I run "tesseract 10002ucw.tif 10002ucw-new pdf txt" I get two files saved to the hard drive one Text and one PDF.
When I use the tesseract-ocr-for-php it creates the two files in the temp folder however only renames one of them so one gets lost.
echo (new TesseractOCR("test/10002ucw.tif")) ->configFile('pdf txt') ->setOutputFile("test/10002ucw-new2") ->lang("eng") ->command;
"tesseract" "test/10002ucw.tif" "/tmp/ocr0BXIOX" -l eng pdf txt
I quickly put in this hack in the TesseractOCT.PHP run() to fix it. I put the TXT last in my list and I call it as followings
echo (new TesseractOCR("test/10002ucw.tif")) ->configFile('pdf txt') ->setOutputFile("test/10002ucw-new2") ->lang("eng") ->run(); if ($this->command->useFileAsOutput) { if (strpos($this->command->configFile, ' ') !== false) { $text = file_get_contents($this->command->getOutputFile()); if ($this->outputFile !== null) { rename($this->command->getOutputFile(), $this->outputFile.".txt"); rename(str_replace(".txt",".pdf",$this->command->getOutputFile()), $this->outputFile.".pdf"); } $this->cleanTempFiles(); } else { $text = file_get_contents($this->command->getOutputFile()); if ($this->outputFile !== null) { rename($this->command->getOutputFile(), $this->outputFile); } $this->cleanTempFiles(); } }
The text was updated successfully, but these errors were encountered:
Dear, brother Can you please help me to find out how to run tesseract on cPanel for Laravel project
Sorry, something went wrong.
thiagoalessio
No branches or pull requests
When I run "tesseract 10002ucw.tif 10002ucw-new pdf txt" I get two files saved to the hard drive one Text and one PDF.
When I use the tesseract-ocr-for-php it creates the two files in the temp folder however only renames one of them so one gets lost.
echo (new TesseractOCR("test/10002ucw.tif"))
->configFile('pdf txt')
->setOutputFile("test/10002ucw-new2")
->lang("eng")
->command;
"tesseract" "test/10002ucw.tif" "/tmp/ocr0BXIOX" -l eng pdf txt
I quickly put in this hack in the TesseractOCT.PHP run() to fix it. I put the TXT last in my list and I call it as followings
Environment
The text was updated successfully, but these errors were encountered: