Describe the bug
When using dd() on any PDF::loadView()->getOptions() it looks like the default config dompdf.php values are loaded instead of the published config/dompdf.php values. Thing to watch is the chroot, which should be /var/www/html (working in a linux based docker) but shows /var/www/html/vendor/dompdf/dompdf. Changing the value by using getOptions()->setChroot(realpath(base_path()) actually shows the correct path after dd() and changes the way the PDF is rendered.
Below the standard snippet provided by publishing the config.
`
/**
==== IMPORTANT ====
dompdf's "chroot": Prevents dompdf from accessing system files or other
files on the webserver. All local files opened by dompdf must be in a
subdirectory of this directory. DO NOT set it to '/' since this could
allow an attacker to use dompdf to read any files on the server. This
should be an absolute path.
This is only checked on command line call by dompdf.php, but not by
To Reproduce
Steps to reproduce the behavior:
Laravel 10 with DOMPDF 2.0.1
Reproducable by running php artisan vendor:publish --provider="Barryvdh\DomPDF\ServiceProvider" and dd(PDF::loadView(any blade.php)->getOptions()), all values should be default instead of the published values.
Describe the bug When using dd() on any PDF::loadView()->getOptions() it looks like the default config dompdf.php values are loaded instead of the published config/dompdf.php values. Thing to watch is the chroot, which should be /var/www/html (working in a linux based docker) but shows /var/www/html/vendor/dompdf/dompdf. Changing the value by using getOptions()->setChroot(realpath(base_path()) actually shows the correct path after dd() and changes the way the PDF is rendered.
Below the standard snippet provided by publishing the config. ` /**
To Reproduce Steps to reproduce the behavior: Laravel 10 with DOMPDF 2.0.1
Reproducable by running php artisan vendor:publish --provider="Barryvdh\DomPDF\ServiceProvider" and dd(PDF::loadView(any blade.php)->getOptions()), all values should be default instead of the published values.