From: Vincent Vanwaelscappel Date: Tue, 17 Mar 2026 11:46:16 +0000 (+0100) Subject: wip #8048 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=cccdc468bce4346ab34c3ca91d9b8daa4a445acb;p=cubist_pdf.git wip #8048 --- diff --git a/src/PDFTools.php b/src/PDFTools.php index 1125631..93ac695 100644 --- a/src/PDFTools.php +++ b/src/PDFTools.php @@ -592,15 +592,16 @@ class PDFTools /** * @throws \Exception */ - public static function extractMarkdown($pdf, $out) + public static function extractMarkdown($pdf, $out, $filename = "document.md") { $dir = Files::mkdir($out . '/docling'); $docling = new CommandLine('python'); $docling->setArg(null, self::resource_path('tools/docling/convert_page.py')); $docling->setArg(null, $pdf); $docling->setArg(null, $dir); + $docling->setArg(null, $filename); $docling->execute(); - if (!file_exists($dir . 'p1.md')) { + if (!file_exists($dir . '/' . $filename)) { throw new \Exception('An error occured during docling process : ' . $docling->getCommand() . ' // ' . $docling->getOutput()); } }