Replies: 5 comments 10 replies
-
@Teddy937 out of curiosity, if you save the file to disk instead of downloading it/rendering it inline - does the saved pdf open? |
Beta Was this translation helpful? Give feedback.
-
I receive the same error, using this code: $pdf = BrowserShot::url($url)
->noSandbox()
->setChromePath('/usr/bin/google-chrome')
->format('a4');
return Response::make($pdf->pdf(), headers: [
'Content-Type' => 'application/pdf',
'Content-Disposition' => "inline; filename=\"$filename\"",
]); If instead of returning a response I use |
Beta Was this translation helpful? Give feedback.
-
The output from Puppeteer was changed in v23: puppeteer/puppeteer#12823 and https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v23.0.0 I've created a PR to fix the issue: #869 |
Beta Was this translation helpful? Give feedback.
-
I see that there is a new release which says should solve this problem when using Puppeteer 23.x, however, after upgrading Browsershot, I am still getting the error when trying to display the inline PDF, without any exception being logged. As soon as I revert to Puppeteer 22, it starts working again. Did I maybe understood wrong, that latest 4.2.1 release fixes the issue? |
Beta Was this translation helpful? Give feedback.
-
So after downgrading back to version 22.15.0 as @bluesheep100 mentioned, It still did not work. After giving puppeteer appropriate permissions to access the .cache/puppeteer directory which I copied to root folder of my project and pointed to it using .puppeteerrc.cjs as described here: here. |
Beta Was this translation helpful? Give feedback.
-
Am getting this error on ubuntu server when trying to display pdf generate by spatie pdf , Locally everything works fine
Beta Was this translation helpful? Give feedback.
All reactions