]> BookStack Code Mirror - bookstack/blobdiff - app/Config/snappy.php
Fixed tests from streaming changes
[bookstack] / app / Config / snappy.php
index f347eda23349264d1b3d4118afadbedde0a5990a..8ab10a39c432baa0e6d880136a3584f4e168a021 100644 (file)
@@ -7,6 +7,10 @@
  * 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' => [
@@ -14,7 +18,8 @@ return [
         'binary'  => file_exists(base_path('wkhtmltopdf')) ? base_path('wkhtmltopdf') : env('WKHTMLTOPDF', false),
         'timeout' => false,
         'options' => [
-            'outline' => true
+            'outline'   => true,
+            'page-size' => $snappyPaperSizeMap[env('EXPORT_PAGE_SIZE', 'a4')] ?? 'A4',
         ],
         'env'     => [],
     ],