]> BookStack Code Mirror - bookstack/blobdiff - app/Config/exports.php
Customization: Added parent tag classes
[bookstack] / app / Config / exports.php
index 63cc2419d3b56ad53037f5214d9a3c4772bdc7ac..2e22bc759e331d5879b6ab59d90c9f75d8ceb334 100644 (file)
@@ -29,24 +29,17 @@ return [
     // Example: EXPORT_PDF_COMMAND="/scripts/convert.sh {input_html_path} {output_pdf_path}"
     'pdf_command' => env('EXPORT_PDF_COMMAND', false),
 
+    // The amount of time allowed for PDF generation command to run
+    // before the process times out and is stopped.
+    'pdf_command_timeout' => env('EXPORT_PDF_COMMAND_TIMEOUT', 15),
+
     // 2024-04: Snappy/WKHTMLtoPDF now considered deprecated in regard to BookStack support.
     'snappy' => [
-        'pdf' => [
-            'enabled' => true,
-            'binary'  => file_exists(base_path('wkhtmltopdf')) ? base_path('wkhtmltopdf') : env('WKHTMLTOPDF', false),
-            'timeout' => false,
-            'options' => [
-                'outline'   => true,
-                'page-size' => $snappyPaperSizeMap[$exportPageSize] ?? 'A4',
-            ],
-            'env'     => [],
-        ],
-        'image' => [
-            'enabled' => false,
-            'binary'  => '/usr/local/bin/wkhtmltoimage',
-            'timeout' => false,
-            'options' => [],
-            'env'     => [],
+        'pdf_binary' => env('WKHTMLTOPDF', false),
+        'options' => [
+            'print-media-type' => true,
+            'outline'   => true,
+            'page-size' => $snappyPaperSizeMap[$exportPageSize] ?? 'A4',
         ],
     ],
 
@@ -121,6 +114,7 @@ return [
          * @var array
          */
         'allowed_protocols' => [
+            "data://" => ["rules" => []],
             'file://'  => ['rules' => []],
             'http://'  => ['rules' => []],
             'https://' => ['rules' => []],