From 44febff06616b83854cebbd221220f4fb0480894 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 15 Jan 2026 15:13:38 +0100 Subject: [PATCH] #7894 --- app/process.php | 5 ++++- app/src/AssetsOperations.php | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 app/src/AssetsOperations.php 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 @@ +