Questions tagged [browsershot]

Browsershot is a 3rd party Laravel package developed by Spatie to capture webpage screenshots using Google's Puppeteer and Chrome

The browsershot package can convert a webpage to an image or pdf. The conversion is done behind the scenes by Puppeteer which controls a headless version of Google Chrome.

https://github.com/spatie/browsershot

47 questions
0
votes
1 answer

Error using Spatie/Browsershot in Laravale : npm & node not found

I installed Spatie/Browsershot with composer and immediately got an error which is above my pay-grade... can someone please help. use Spatie\Browsershot\Browsershot; Browsershot::html('testing')->save('/public/assets/pdfs/example.pdf'); The…
Paul Godard
  • 1,055
  • 1
  • 14
  • 30
0
votes
0 answers

A temporary file could not opened to write the process output: fopen (C:\Windows\Temp\sf_proc_00.out.lock)

Using Browsershot, I am getting this error: A temporary file could not opened to write the process output: fopen (C:\Windows\Temp\sf_proc_00.out.lock) My user is an MSA account on a Windows Server and he is not an admin, so he doesn't have write…
pileup
  • 1
  • 2
  • 18
  • 45
0
votes
0 answers

For some reason Chrome did not write a file

For some reason Chrome did not write a file at In my laravel Project I had installed Browser shot using composer require spatie/browsershot and then npm install -g puppeteer npm install -g chromium Also had set my paths This is my Main Code In…
0
votes
1 answer

Can't get Spatie Browsershot to work on Windows with XAMPP, few different errors

I am trying to make Spatie Browsershot work on Windows with XAMPP. First of all I installed puppeteer: npm install -g puppeteer At first I wanted to output the result directly to the browser, so I had the following code in the controller: use…
pileup
  • 1
  • 2
  • 18
  • 45
0
votes
1 answer

Laravel Spatie Browsershot on Windows: works in console, not in browser

I can't wrap my head around the following issue. I have a development environment on Windows 11. I try to get Spatie's Browsershot working on Windows and keep getting errors about node not being recognized as a internal or external program. However,…
RayK
  • 69
  • 6
0
votes
0 answers

Browsershot not wroking on Laravel queue

I have an issue where as I am taking screenshots of responses using Browsershot which works fine when using dispatchSync. But as soon as I switch over to dispatch and use the queue (redis) the jobs fail with the following output; Working directory:…
Luke Snowden
  • 4,056
  • 2
  • 37
  • 70
0
votes
1 answer

Using laravel browsershot

I installed Browsershot and I'm taking google's image to test it. I prepared the route but it gives an unexpected error. Symfony\Component\Process\Exception\ProcessFailedException The command "C:^\nodejs^\node…
Aleyn
  • 35
  • 5
0
votes
0 answers

Generate pdf report lost all tailwindcss styling? Can it be fixed?

In framework 9.30 app with spatie/browsershot 3.57 and tailwindcss 3.1.0 I have a card and I generate pdf report from blade.php page with tailwindcss styling. But in generate pdf all tailwindcss styles are lost. Seems, that is how…
mstdmstd
  • 2,195
  • 17
  • 63
  • 140
0
votes
0 answers

Browsershot / Puppeteer ENOTCONN error only when called from Laravel controller

I have a Laravel project which attempts to execute this command from within a controller. $filename = 'google.png'; $screenshot = Browsershot::url('http://google.com/') ->setNodeBinary('C:\PROGRA~1\nodejs\node.exe') …
Mat
  • 11
  • 2
0
votes
1 answer

Puppeteer/BrowserShot: file not found but it exists

I'm trying to use Puppeteer and BrowserShot on an Ubuntu machine to make and screenshot of a static HTML. The thing is that every time I try to make and screenshot: Screenshot::loadView('monthly_resume.resume') …
Victor
  • 995
  • 1
  • 10
  • 26
0
votes
1 answer

Spatie Browsershot cant save image

Here is the error screen Spatie\Browsershot\Exceptions\CouldNotTakeBrowsershot The given path F:\xampp\htdocs\testcover\public/uploads/ did not contain an extension. Please append an extension I received this error when trying to save an HTML file…
0
votes
0 answers

Laravel development on Windows 10 - node is not recognized

Here is my problem, I am dealing with it for a days, and any help is greatly appreciated. I am developing a project using Laravel, on a Windows 10. I have installed NodeJS, NPM works just as expected, and also when I check node -v through CMD or…
0
votes
2 answers

Call Docker container outside docker

I have a project running under Apache and without docker. However, in this project, I have a PDF export and this PDF export I want to call it in a docker container. How do you do that? Here is my docker-compose.yaml : version: "3.3" services: …
Victor
  • 44
  • 5
0
votes
1 answer

Generating web page into image is not working for Spatie Browsershot

I am developing a web application using the Laravel framework. I need to generate the web page into pdf/ image in my application. I am using PHP browser shot spatie package for it, https://github.com/spatie/browsershot. I created a test function to…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
0
votes
1 answer

Cant get Node to work with Laravel and browsershot

I am trying to use the below package to generate pdf. https://github.com/spatie/browsershot I have node setup correctly. C:\Users>node -v v10.16.3 but I can't get it to work with Laravel and browsershots below is the error: Symfony \ Component \…
Vicky T
  • 3
  • 3