X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/3acea12f1c0013be4f1e3994cae2ea662e43bb4e..refs/pull/3303/head:/app/Config/snappy.php diff --git a/app/Config/snappy.php b/app/Config/snappy.php index 60c26ffd5..8ab10a39c 100644 --- a/app/Config/snappy.php +++ b/app/Config/snappy.php @@ -7,13 +7,20 @@ * 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. */ +$snappyPaperSizeMap = [ + 'a4' => 'A4', + 'letter' => 'Letter', +]; return [ 'pdf' => [ 'enabled' => true, 'binary' => file_exists(base_path('wkhtmltopdf')) ? base_path('wkhtmltopdf') : env('WKHTMLTOPDF', false), 'timeout' => false, - 'options' => [], + 'options' => [ + 'outline' => true, + 'page-size' => $snappyPaperSizeMap[env('EXPORT_PAGE_SIZE', 'a4')] ?? 'A4', + ], 'env' => [], ], 'image' => [