$res = PDFOperations::extractTexts($_POST['pdf'], $_POST['out'], $_POST['mode'] ?? 'standard', $_POST['method'] ?? 'fluidbook', $_POST['ignoreseparators'] ?? '');
} else if ($_POST['operation'] === 'extracthightlightsdata') {
$res = PDFOperations::extractHighlightsData($_POST['pdf'], $_POST['out'], $_POST['mode'], $_POST['ignoreseparators']);
+ } else if ($_POST['operation'] === 'extractmarkdown') {
+ $res = PDFOperations::extractMarkdown($_POST['pdf'], $_POST['out']);
} else {
if (!isset($_POST['pdf'])) {
if (isset($_POST['toolbox'])) {
return $out;
}
+ public static function extractMarkdown($pdf, $out)
+ {
+ PDFTools::extractMarkdown(Buffer::getIn($pdf), $out);
+ Buffer::syncOut();
+ return $out;
+ }
+
}
\ No newline at end of file