2017-01-01 20:20:30 +08:00
|
|
|
<?php
|
|
|
|
|
2018-12-24 00:26:39 +08:00
|
|
|
/**
|
|
|
|
* SnappyPDF configuration options.
|
|
|
|
*
|
|
|
|
* Changes to these config files are not supported by BookStack and may break upon updates.
|
|
|
|
* Configuration should be altered via the `.env` file or environment variables.
|
|
|
|
* Do not edit this file unless you're happy to maintain any changes yourself.
|
|
|
|
*/
|
2022-01-31 01:40:42 +08:00
|
|
|
$snappyPaperSizeMap = [
|
2022-01-31 22:16:56 +08:00
|
|
|
'a4' => 'A4',
|
2022-01-31 01:40:42 +08:00
|
|
|
'letter' => 'Letter',
|
|
|
|
];
|
|
|
|
|
2017-01-01 20:20:30 +08:00
|
|
|
return [
|
|
|
|
'pdf' => [
|
|
|
|
'enabled' => true,
|
|
|
|
'binary' => file_exists(base_path('wkhtmltopdf')) ? base_path('wkhtmltopdf') : env('WKHTMLTOPDF', false),
|
|
|
|
'timeout' => false,
|
2020-04-26 04:37:52 +08:00
|
|
|
'options' => [
|
2022-01-31 22:16:56 +08:00
|
|
|
'outline' => true,
|
2022-01-31 01:40:42 +08:00
|
|
|
'page-size' => $snappyPaperSizeMap[env('EXPORT_PAGE_SIZE', 'a4')] ?? 'A4',
|
2020-04-26 04:37:52 +08:00
|
|
|
],
|
2017-01-01 20:20:30 +08:00
|
|
|
'env' => [],
|
|
|
|
],
|
|
|
|
'image' => [
|
|
|
|
'enabled' => false,
|
|
|
|
'binary' => '/usr/local/bin/wkhtmltoimage',
|
|
|
|
'timeout' => false,
|
|
|
|
'options' => [],
|
|
|
|
'env' => [],
|
|
|
|
],
|
|
|
|
];
|