]> BookStack Code Mirror - bookstack/blobdiff - app/Config/snappy.php
Added option to configure PDF export paper size
[bookstack] / app / Config / snappy.php
index 0f012bef6cfd52004e8ff233b9169d22ec8f5bff..abdec88326cb82c1e61f4fcf85ea83817f5ddbb2 100644 (file)
@@ -8,6 +8,11 @@
  * Do not edit this file unless you're happy to maintain any changes yourself.
  */
 
+$snappyPaperSizeMap = [
+    'a4' => 'A4',
+    'letter' => 'Letter',
+];
+
 return [
     'pdf' => [
         'enabled' => true,
@@ -15,6 +20,7 @@ return [
         'timeout' => false,
         'options' => [
             'outline' => true,
+            'page-size' => $snappyPaperSizeMap[env('EXPORT_PAGE_SIZE', 'a4')] ?? 'A4',
         ],
         'env'     => [],
     ],