browsershot & laravel-pdf #68
-
I am using laravel 10 jetstream php 8.2. Installed puppeteer, chrome, and then spatie/laravel-pdf. Browsershot works but not laravel-pdf. Any ideas for me? btw ->newHeadless() makes browsershot work, but is not a method in Pdf. Route::get('/testes', function () {
}); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@azc666 you can add Browsershot instance to add more customization using Laravel PDF, here is an example from the docs, so then you can add use Spatie\LaravelPdf\Facades\Pdf;
Pdf::url('https://example.com')
->withBrowsershot(function (Browsershot $browsershot) {
$browsershot->newHeadless();
})
->save('example3.pdf'); |
Beta Was this translation helpful? Give feedback.
@azc666 you can add Browsershot instance to add more customization using Laravel PDF, here is an example from the docs, so then you can add
newHeadless()
method and chain more of them using the browsershot instance from the closure, eg: