// 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',
],
],
* @var array
*/
'allowed_protocols' => [
+ "data://" => ["rules" => []],
'file://' => ['rules' => []],
'http://' => ['rules' => []],
'https://' => ['rules' => []],