From 62a82e9daa894c5cc5b3f4d82a9cf17a74ff10d4 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 21 Jan 2026 16:27:59 +0100 Subject: [PATCH] #7954 --- src/CommandLine/Docling.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/CommandLine/Docling.php b/src/CommandLine/Docling.php index 91af002..71bc163 100644 --- a/src/CommandLine/Docling.php +++ b/src/CommandLine/Docling.php @@ -32,9 +32,14 @@ class Docling extends CommandLine $cli->setArg(null, $image); $cli->execute(); - $md = file_get_contents($tmp . '/' . $f->getBasename('.' . $f->getExtension()) . '.md'); + $mdOutput = $tmp . '/' . $f->getBasename('.' . $f->getExtension()) . '.md'; - $html = Markdown::toHTML($md, false); + if (file_exists($mdOutput)) { + $md = file_get_contents($mdOutput); + $html = Markdown::toHTML($md, false); + } else { + $html = ''; + } file_put_contents($out, $html); } if ($returnFile) { -- 2.39.5