Showing
1 changed file
with
2 additions
and
1 deletions
| ... | @@ -21,7 +21,8 @@ public function preview_pdf(Request $request){ | ... | @@ -21,7 +21,8 @@ public function preview_pdf(Request $request){ |
| 21 | } | 21 | } |
| 22 | public function import_pdf(Request $request){ | 22 | public function import_pdf(Request $request){ |
| 23 | try { | 23 | try { |
| 24 | - [$image_path,$js_path] = $this->ocr_process($request); | 24 | + if($request->is_test) [$image_path,$js_path] = [$request->image_path,$request->js_path]; |
| 25 | + else [$image_path,$js_path] = $this->ocr_process($request); | ||
| 25 | $json_data = json_decode(file_get_contents($js_path), true); | 26 | $json_data = json_decode(file_get_contents($js_path), true); |
| 26 | $ocr=[]; | 27 | $ocr=[]; |
| 27 | $ocr['json_data']=$json_data; | 28 | $ocr['json_data']=$json_data; | ... | ... |
-
Please register or sign in to post a comment