diff --git a/app/Http/Controllers/SetupController.php b/app/Http/Controllers/SetupController.php index 043056ae5049..a4a18129e870 100644 --- a/app/Http/Controllers/SetupController.php +++ b/app/Http/Controllers/SetupController.php @@ -1,4 +1,5 @@ input('url'); - if (substr($url, -1) != '/') { - $url = $url.'/'; - } + if (substr($url, -1) != '/') + $url = $url . '/'; $_ENV['APP_KEY'] = config('app.key'); $_ENV['APP_URL'] = $url; @@ -107,7 +102,7 @@ class SetupController extends Controller } /* Write the .env file */ - $filePath = base_path().'/.env'; + $filePath = base_path() . '/.env'; $fp = fopen($filePath, 'w'); fwrite($fp, $config); fclose($fp); @@ -196,10 +191,11 @@ class SetupController extends Controller return $this->testPhantom(); } - Browsershot::url('https://www.invoiceninja.com')->savePdf( - // Browsershot::html('If you see this text, generating PDF works! Thanks for using Invoice Ninja!')->savePdf( - public_path('test.pdf') - ); + Browsershot::url('https://www.invoiceninja.com') + ->noSandbox() + ->savePdf( + public_path('test.pdf') + ); return response(['url' => asset('test.pdf')], 200); } catch (\Exception $e) { diff --git a/app/Utils/Traits/Pdf/PdfMaker.php b/app/Utils/Traits/Pdf/PdfMaker.php index 8cbcc409273c..25fd6ef59437 100644 --- a/app/Utils/Traits/Pdf/PdfMaker.php +++ b/app/Utils/Traits/Pdf/PdfMaker.php @@ -40,6 +40,7 @@ trait PdfMaker ->showBackground() ->deviceScaleFactor(1) ->waitUntilNetworkIdle(true) + ->noSandbox() ->pdf(); } } diff --git a/resources/views/setup/_issues.blade.php b/resources/views/setup/_issues.blade.php index 896648389ca5..7baf3165456e 100644 --- a/resources/views/setup/_issues.blade.php +++ b/resources/views/setup/_issues.blade.php @@ -61,42 +61,6 @@ @endif -