Hello, could you please show how we could set up this on a linux production server? A week ago I used this package and everything was perfect on local during development. But it was a nightmare when it came to using it in production unit I had to abandon it and use Dompdf instead.
I will consider it, make sure your production server meets the requirements for Browsershot by checking their documentation since not all servers are configured the same. You may also refer to puppeteer's docs: pptr.dev/troubleshooting#chrome-doesnt-launch-on-linux. And also Spatie's requirement guide: spatie.be/docs/browsershot/v4/requirements#content-custom-node-and-npm-binaries
Here's all my settings (github.com/glennraya/vscode-settings-json), you can install "Custom CSS and JS Loader" vscode extension, I made some mods to it since this video, you can refer to my latest video (ruclips.net/video/y1bj5xBl8Ag/видео.html) on this channel to see how it looks.
Spatie's Browsershot package doesn't directly support including the header on every succeeding page, however, you may achieve the repeating header effect by experimenting with custom CSS, like setting the header with a fixed positioning so it "could" appear on every page.
@@scherzer6428 I don't think making a video about the dashboard is going to bring much value to people haha. Thanks for the compliment. However, I will upload a new video tomorrow, creating advanced, Google like search engine for one's projects.
@@glennraya i got the below error when i generate pdf in windows.I already have node installed in the system.How can i solve this The command "node "D:\wamp64\www\browsershot\vendor\spatie\browsershot\src/../bin/browser.cjs" "{""url"":""file:\/\/C:\\Users\\Ajmal\\AppData\\Local\\Temp\\896216291-0639441001719154368\\index.html"",""action"":""pdf"",""options"":{""path"":""D:\\wamp64\\www\\browsershot\\storage\\\/app\/reports\/example.pdf"",""args"":[],""viewport"":{""width"":800,""height"":600},""displayHeaderFooter"":false,""margin"":{""top"":""4mm"",""right"":""0mm"",""bottom"":""4mm"",""left"":""0mm""},""format"":""A4"",""printBackground"":true}}"" failed. Exit Code: 1(General error) Working directory: D:\wamp64\www\browsershot\public Output: ================ Error Output: ================ 'node' is not recognized as an internal or external command, operable program or batch file.
Correct, I should've streamed it. But anyway, this video is about generating PDFs. Next time I'll carefully consider things when making a video. Thanks.
I used the "Custom CSS and JS Loader" extension in order to customize some parts of the interface. You can define your styles in CSS to modify VSCode's UI.
how about laravel print automatic to printer witout pop up print screen in browser through javascript (window.print). i mean print it automatic from server side (silent print). please make this tutorial .
I think DomPDF is faster than Browsershot because Browsershot uses puppeteer which is a node library, but IMO Browsershot can generate PDFs more accurately than DomPDF (and the API is easier too).
@@nilanjanchakraborty2694 The theme itself is "Palenight", but my VS Code's UI is modified beyond what themes can give you, you can use "Custom CSS and JS Loader" extension to modify VS Code's UI extensively. After installing the plugin you can try my current settings: github.com/glennraya/vscode-settings-json
It's pretty cool I guess I would try that Library. Another Cool Video. Please keep it up
@@wormy_coder thank you! 🙏
Is it necessary to store PDF files on the server? Can we use something like stream() in dompdf so that the PDF files don't need to be stored?
Hi, yes definitely. You can also directly download PDFs or open it in a new browser tab. You don't have to necessarily save it on the server.
Hello, could you please show how we could set up this on a linux production server? A week ago I used this package and everything was perfect on local during development. But it was a nightmare when it came to using it in production unit I had to abandon it and use Dompdf instead.
I will consider it, make sure your production server meets the requirements for Browsershot by checking their documentation since not all servers are configured the same. You may also refer to puppeteer's docs: pptr.dev/troubleshooting#chrome-doesnt-launch-on-linux. And also Spatie's requirement guide: spatie.be/docs/browsershot/v4/requirements#content-custom-node-and-npm-binaries
Could you please provide me with the settings.json file that looks fabulous?
Here's all my settings (github.com/glennraya/vscode-settings-json), you can install "Custom CSS and JS Loader" vscode extension, I made some mods to it since this video, you can refer to my latest video (ruclips.net/video/y1bj5xBl8Ag/видео.html) on this channel to see how it looks.
can Laravel PDF Magic repeat header and footer on every page?
Spatie's Browsershot package doesn't directly support including the header on every succeeding page, however, you may achieve the repeating header effect by experimenting with custom CSS, like setting the header with a fixed positioning so it "could" appear on every page.
Tailwindui library? I see a beatiful dashboard.
No, it's not tailwindUI. I made it myself, though it was inspired by the Arc browser UI, and the date range picker is from nextUI. Thanks
@@glennraya Can you make a video about the dashboard
@@scherzer6428 I don't think making a video about the dashboard is going to bring much value to people haha. Thanks for the compliment. However, I will upload a new video tomorrow, creating advanced, Google like search engine for one's projects.
Can you share the source code?
Yes sure, I'll push it to github and linked on the description.
github.com/glennraya/browsershot
@@glennraya i got the below error when i generate pdf in windows.I already have node installed in the system.How can i solve this
The command "node "D:\wamp64\www\browsershot\vendor\spatie\browsershot\src/../bin/browser.cjs" "{""url"":""file:\/\/C:\\Users\\Ajmal\\AppData\\Local\\Temp\\896216291-0639441001719154368\\index.html"",""action"":""pdf"",""options"":{""path"":""D:\\wamp64\\www\\browsershot\\storage\\\/app\/reports\/example.pdf"",""args"":[],""viewport"":{""width"":800,""height"":600},""displayHeaderFooter"":false,""margin"":{""top"":""4mm"",""right"":""0mm"",""bottom"":""4mm"",""left"":""0mm""},""format"":""A4"",""printBackground"":true}}"" failed. Exit Code: 1(General error) Working directory: D:\wamp64\www\browsershot\public Output: ================ Error Output: ================ 'node' is not recognized as an internal or external command, operable program or batch file.
hi, thanks for the package , Often, we want to stream the PDF ... you didn't mention that part
Correct, I should've streamed it. But anyway, this video is about generating PDFs. Next time I'll carefully consider things when making a video. Thanks.
@@glennraya thanks, 👌
Your vscode theme looks super dope! What'd you use to make it look like this?
I used the "Custom CSS and JS Loader" extension in order to customize some parts of the interface. You can define your styles in CSS to modify VSCode's UI.
how about laravel print automatic to printer witout pop up print screen in browser through javascript (window.print). i mean print it automatic from server side (silent print). please make this tutorial .
@@yoskokleng3658 I don't think that's possible on a web interface. Maybe some form of dirty hack would do.
thanks idol, u have my sub
what's framework for css ? if i can think of the style of report design like u. my customer would love me 🤣😭
@@yoskokleng3658 I use tailwindcss for the css framework.
OMG this is what I have been looking for! Thanks for posting.
You're welcome, In a couple of minutes I'll be posting a new video about advanced searching with Laravel Scout (Meilisearch).
Sir Glenn i found difficulty in production there is an error in node any advice to fix it.
What node version are you using? Puppeteer requires node version 18 and up.
@@glennraya I personally was using node 22 but face the error @jimmyarb7767 is probably referring to. Issue was with node and puppeteer
Does it support all browsers?
Yes, it supports all modern browsers.
How do Spatie Browsershot and DomPDF compare in terms of efficiency and speed for generating PDFs?
I think DomPDF is faster than Browsershot because Browsershot uses puppeteer which is a node library, but IMO Browsershot can generate PDFs more accurately than DomPDF (and the API is easier too).
Symfony \ Component\ Process \ Exception\ ProcessFailedException. the error occured. idk is this the window issue or what.
I think this package only works for MacOs users, not Windows or Linux.
theme name please?
Hi, which theme you're asking? VS Code's or the dashboard's?
@@glennraya vs code
@@nilanjanchakraborty2694 The theme itself is "Palenight", but my VS Code's UI is modified beyond what themes can give you, you can use "Custom CSS and JS Loader" extension to modify VS Code's UI extensively. After installing the plugin you can try my current settings: github.com/glennraya/vscode-settings-json
very good explanation
Thank you!
Huui nakikita kita sa programmer code posting
FB group po pa yun? haha
ang galing niyo po
ahaha, salamat 😀
hard to implement on windows
I agree with you
@@rondevPH Really? I couldn't try it, I don't have a windows machine. 😅
@@glennraya good for you. That is why dompdf is the only way😅
I'm trying to get it to work with laragon on windows but I can't figure out how to get it to work.
@@rondevPH hmm, can't tell for sure, Browsershot docs doesn't mention any incompatibility with Windows.