]> BookStack Code Mirror - bookstack/blob - app/Config/snappy.php
Added more complexity in an attempt to make ldap host failover fit
[bookstack] / app / Config / snappy.php
1 <?php
2
3 /**
4  * SnappyPDF configuration options.
5  *
6  * Changes to these config files are not supported by BookStack and may break upon updates.
7  * Configuration should be altered via the `.env` file or environment variables.
8  * Do not edit this file unless you're happy to maintain any changes yourself.
9  */
10
11 $snappyPaperSizeMap = [
12     'a4'     => 'A4',
13     'letter' => 'Letter',
14 ];
15
16 return [
17     'pdf' => [
18         'enabled' => true,
19         'binary'  => file_exists(base_path('wkhtmltopdf')) ? base_path('wkhtmltopdf') : env('WKHTMLTOPDF', false),
20         'timeout' => false,
21         'options' => [
22             'outline'   => true,
23             'page-size' => $snappyPaperSizeMap[env('EXPORT_PAGE_SIZE', 'a4')] ?? 'A4',
24         ],
25         'env'     => [],
26     ],
27     'image' => [
28         'enabled' => false,
29         'binary'  => '/usr/local/bin/wkhtmltoimage',
30         'timeout' => false,
31         'options' => [],
32         'env'     => [],
33     ],
34 ];