From: Vincent Vanwaelscappel Date: Thu, 15 Jan 2026 14:13:38 +0000 (+0100) Subject: #7894 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=44febff06616b83854cebbd221220f4fb0480894;p=fluidbook_processfarm.git #7894 --- diff --git a/app/process.php b/app/process.php index 083bf86..092c97c 100644 --- a/app/process.php +++ b/app/process.php @@ -4,6 +4,7 @@ use Fluidbook\Farmer\PDFOperations; use Fluidbook\Farmer\ProcessFile; use Fluidbook\Farmer\ProcessToolboxDocumentFile; use Fluidbook\Farmer\ProcessToolboxPDFFile; +use Fluidbook\Farmer\AssetsOperations; require_once __DIR__ . "/vendor/autoload.php"; @@ -20,7 +21,9 @@ if (!isset($_POST['operation'])) { } try { - if ($_POST['operation'] === 'fixpdf') { + if ($_POST['operation'] === 'ocr') { + $res = AssetsOperations::OCR($_POST['file'], $_POST['locale']); + } else if ($_POST['operation'] === 'fixpdf') { $res = PDFOperations::fixPDF($_POST['pdf'], $_POST['out']); } else if ($_POST['operation'] === 'cutpdf') { $res = PDFOperations::cutPDF($_POST['pdf'], $_POST['mode'], $_POST['out']); diff --git a/app/src/AssetsOperations.php b/app/src/AssetsOperations.php new file mode 100644 index 0000000..b96e20a --- /dev/null +++ b/app/src/AssetsOperations.php @@ -0,0 +1,13 @@ +