File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 3838 "phpoffice/phpspreadsheet" : " ^1.23" ,
3939 "phpoffice/phpword" : " ^0.18" ,
4040 "laravel/framework" : " ^12.0" ,
41- "thiagoalessio/tesseract_ocr" : " ^2.12 " ,
41+ "thiagoalessio/tesseract_ocr" : " ^2.13 " ,
4242 "html2text/html2text" : " ^4.3" ,
4343 "phpoffice/phppresentation" : " ^1.0"
4444 },
Original file line number Diff line number Diff line change 3434 | For more details please visit - https://github.com/thiagoalessio/tesseract-ocr-for-php#executable
3535 |
3636 */
37- 'executable_path ' => env ('TEXTRACT_OCR_EXEC_PATH ' , null ),
37+ 'executable_path ' => env ('TEXTRACT_OCR_EXEC_PATH ' , ' tesseract ' ),
3838
3939 /*
4040 | -------------------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ protected function getOcr(TesseractOcrOptions $ocrOptions = null): TesseractOCR
3535 $ ocrOptions = new TesseractOcrOptions ();
3636 }
3737 $ ocr = new TesseractOCR ($ this ->utilsService ->getFilePath ());
38+ $ ocr ->psm (6 );
39+ $ ocr ->config ('preserve_interword_spaces ' , '1 ' );
3840 $ ocr ->withoutTempFiles ();
3941 if ($ ocrOptions ) {
4042 foreach ($ ocrOptions ->toArray () as $ option_key => $ option_value ) {
Original file line number Diff line number Diff line change @@ -151,9 +151,11 @@ public function getFileMimeType(): ?string
151151 * @param PdfOptions $options
152152 * @return $this
153153 */
154- public function setPdfOptions (PdfOptions $ options ): self
154+ public function setPdfOptions (? PdfOptions $ options ): self
155155 {
156- $ this ->pdf_options = $ options ;
156+ if (!is_null ($ options )) {
157+ $ this ->pdf_options = $ options ;
158+ }
157159 return $ this ;
158160 }
159161
You can’t perform that action at this time.
0 commit comments