diff --git a/card.php b/card.php index 2fa5530..8ab5d19 100644 --- a/card.php +++ b/card.php @@ -206,7 +206,7 @@ if ($action === 'scan_belege' && $user->hasRight('mahnung', 'write')) { if ($pdftotextAvailable) { // Erst normales pdftotext versuchen $cmd = 'pdftotext -layout '.escapeshellarg($file['fullname']).' - 2>/dev/null'; - $text = trim((string) @shell_exec($cmd)); + $text = trim((string) @shell_exec($cmd), " \t\n\r\0\x0B\x0C"); // Kein Text? → OCR via ocrmypdf (Bild-PDF lesbar machen) if ($text === '') {