4

I am update composer and use barryvdh/laravel-dompdf package.

the problem is when i click the button it show me error like image below:-

enter image description here

Is that anyway to change the folder path? or am I missing code to modify path to download the pdf file?

lun7code
  • 189
  • 1
  • 3
  • 13

3 Answers3

9

You need to run this command:

php artisan vendor:publish

Then, try to create a fonts directory in the storage directory.

i.e. storage/app/fonts. Also, remember to make it writable.

For maximum execution time of 30 seconds exceeded, this is not laravel related issue but it's about php configuration issue. Please see this and fix it: http://php.net/manual/en/info.configuration.php#ini.max-execution-time

You can also see this answer: https://stackoverflow.com/a/30290770/6000629

Hope this will helps you!

Hiren Gohel
  • 4,726
  • 6
  • 29
  • 45
  • From Laravel 5.x, the correct path for storage directory is at the root. In my case, using Laravel 5.7 was not necessary run vendor:publish command. – manuelpgs Nov 26 '19 at 14:47
  • @herohat: Yes, my bed :), the `storage` folder is in root, and the path is `storage/app/`. Thanks for looking in it :) – Hiren Gohel Nov 27 '19 at 04:16
2

Try this:

$pdf = PDF::loadView('pdf/personalpdf', compact('user','result'))->setOptions(['defaultFont' => 'sans-serif']);

It worked for me, I didn't make any file/folder

Haroon Mahmood
  • 111
  • 1
  • 4
0

Just remove the reference to css external file in your cart.placeOrder.blade