summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-04-02 09:59:06 +0100
committerlsces <lester@lsces.co.uk>2026-04-02 09:59:06 +0100
commit1e206a538b7a48b3af7f3f5735343a729d43254a (patch)
treec7ea9a675838ead846ab771a1ff6c1da8f313549 /admin
parent2e132cbab719b9d1ff93ce932096e6a21b6c8977 (diff)
downloadliberty-1e206a538b7a48b3af7f3f5735343a729d43254a.tar.gz
liberty-1e206a538b7a48b3af7f3f5735343a729d43254a.tar.bz2
liberty-1e206a538b7a48b3af7f3f5735343a729d43254a.zip
Modern pdf handler using pdf.js extended to allow search from url. Needs the modifed build of pdf.js to work fully.
Diffstat (limited to 'admin')
-rwxr-xr-xadmin/plugins/mime_pdf.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/admin/plugins/mime_pdf.php b/admin/plugins/mime_pdf.php
index d3c34a4..878b3ba 100755
--- a/admin/plugins/mime_pdf.php
+++ b/admin/plugins/mime_pdf.php
@@ -1,6 +1,6 @@
<?php
-
use Bitweaver\KernelTools;
+
require_once '../../../kernel/includes/setup_inc.php';
include_once KERNEL_PKG_INCLUDE_PATH . 'simple_form_functions_lib.php';
@@ -9,21 +9,25 @@ $gBitSystem->verifyPermission( 'p_admin' );
$feedback = [];
$pdfSettings = [
- 'pdf2swf_path' => [
- 'label' => 'Path to pdf2swf',
- 'note' => 'Path to the pdf2swf executable.',
+ 'pdftotext_path' => [
+ 'label' => 'Path to pdf text layer extractor',
+ 'note' => 'Path to pdftotext executable.',
'type' => 'text',
],
- 'swfcombine_path' => [
- 'label' => 'Path to swfcombine',
- 'note' => 'Path to the swfcombine executable.',
+ 'convert_path' => [
+ 'label' => 'Path to image extractor from pdf file',
+ 'note' => 'Path to convert executable.',
'type' => 'text',
],
+ 'pdf_thumbnails' => [
+ 'label' => 'PDF Upload Thumbnails',
+ 'note' => 'Create thumbnails for PDF uploads.',
+ 'type' => 'checkbox',
+ ],
];
if( function_exists( 'shell_exec' )) {
- $pdfSettings['pdf2swf_path']['default'] = shell_exec( 'which pdf2swf' );
- $pdfSettings['swfcombine_path']['default'] = shell_exec( 'which swfcombine' );
+ $pdfSettings['pdftotext_path']['default'] = shell_exec( 'which pdftotext' );
} else {
$feedback['error'] = "You can not execute binaries on your server. You can not make use of this plugin.";
}