From: Vincent Vanwaelscappel Date: Wed, 21 Jan 2026 15:27:59 +0000 (+0100) Subject: #7954 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=62a82e9daa894c5cc5b3f4d82a9cf17a74ff10d4;p=cubist_util.git #7954 --- 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) {