Skip to content
Discussion options

You must be logged in to vote

@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:

use Spatie\LaravelPdf\Facades\Pdf;

Pdf::url('https://example.com')
    ->withBrowsershot(function (Browsershot $browsershot) {
        $browsershot->newHeadless();
    })
    ->save('example3.pdf');

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@azc666
Comment options

Answer selected by azc666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants