*Don't get left behind! Try Spec Coder: Supercharge Your Coding with AI!* 👉 qirolab.com/spec-coder TABLE OF CONTENTS 00:00 - Intro 00:37 - Introduction to Laravel browsershot package 02:19 - Create Laravel Application 03:15 - Install spatie/browsershot package 04:14 - Fix NODE & NPM binary path & Generate PDF 10:01 - Download PDF file 11:57 - Stream or Display PDF in the browser 13:10 - Generate PDF using Blade view file 17:38 - set PDF paper size 18:43 - PDF paper margins 19:14 - PDF Page break / add multiple pages, 20:31 - Set common header & footer for all pages 22:45 - Show page number and total pages in page footer 24:24 - Fix the image issue in the Header section 26:52 - Set font family and font size in PDF File 29:01 - Pass dynamic variables in PDF file 29:45 - refactoring pdf generator code and creating a `PDFWrapper` class 42:18 - Export Google Charts in PDF Support my work: 1. On BuyMeACoffee: www.buymeacoffee.com/qirolab DigitalOcean Referral m.do.co/c/e740238537d0 Also, follow us on: 𝐅𝐚𝐜𝐞𝐛𝐨𝐨𝐤: fb.com/qirolab 𝐓𝐰𝐢𝐭𝐭𝐞𝐫: twitter.com/qirolab
This is a great package but one question that has not been answered in this tutorial. The question is, for windows user setNodeBinary() or setIncludePath() actually takes the local machine path but how this path will be available in the production server? Server throws exception as usually mentioning that the path is not recognized. What is the solution of this problem?
thank you very much for this tutorial... but after examining spatie's github account there is another one of laravel-pdf based on browsershot but returns the same error of npm and node not found
You can leverage Laravel's templating engine (Blade or similar) to create the initial PDF with fillable form fields pre-populated with your data. Then, use Browsershot to render that HTML template as the PDF.
People that are using this within windows will run into erros. And it seems it is not compatible for windows. Currently Mac and Ubuntu users can use this package without problems.
*Don't get left behind! Try Spec Coder: Supercharge Your Coding with AI!*
👉 qirolab.com/spec-coder
TABLE OF CONTENTS
00:00 - Intro
00:37 - Introduction to Laravel browsershot package
02:19 - Create Laravel Application
03:15 - Install spatie/browsershot package
04:14 - Fix NODE & NPM binary path & Generate PDF
10:01 - Download PDF file
11:57 - Stream or Display PDF in the browser
13:10 - Generate PDF using Blade view file
17:38 - set PDF paper size
18:43 - PDF paper margins
19:14 - PDF Page break / add multiple pages,
20:31 - Set common header & footer for all pages
22:45 - Show page number and total pages in page footer
24:24 - Fix the image issue in the Header section
26:52 - Set font family and font size in PDF File
29:01 - Pass dynamic variables in PDF file
29:45 - refactoring pdf generator code and creating a `PDFWrapper` class
42:18 - Export Google Charts in PDF
Support my work:
1. On BuyMeACoffee: www.buymeacoffee.com/qirolab
DigitalOcean Referral
m.do.co/c/e740238537d0
Also, follow us on:
𝐅𝐚𝐜𝐞𝐛𝐨𝐨𝐤: fb.com/qirolab
𝐓𝐰𝐢𝐭𝐭𝐞𝐫: twitter.com/qirolab
For Windows Users:
Cache the configuration and then try it.
Cache command: php artisan config:cache
3 days... looking for a solution, nothing works. You are awesome, i love you today. So much thanks
@@NatxoXI i'm glad it helped someone.😇😇
This is a great package but one question that has not been answered in this tutorial. The question is, for windows user setNodeBinary() or setIncludePath() actually takes the local machine path but how this path will be available in the production server? Server throws exception as usually mentioning that the path is not recognized.
What is the solution of this problem?
thank you very much for this tutorial... but after examining spatie's github account there is another one of laravel-pdf based on browsershot but returns the same error of npm and node not found
sorry i found the solution by adding withbrowsershot function ...
Wow I needed this today!! Working on CMS for daycare that needs to create files
I hope it will be helpful
thank you alot u r good person
So nice of you
Great tutorial ✔✔❤. I think every Laravel app must utilize the package at some point.
Thank you
Page numbers not automcatic right? Is there any way?
Thank you for the video. It's very interesting and helpful.
Glad it was helpful!
in production server not loading content of browsershot pdf
Very Nice this tutorial is very help full for developers
Glad to hear that
thank you, this is great tutorial
Glad you like it!
has anyone used this package succesfully? because I get a lot of errors
😂😂😂 same pinch🙌
I think you are running this on windows. To make it work you need to figure out the node and npm path.
@@QiroLabit didn't work
Very good.
Many many thanks
Is it possible to export data to an existing fillable PDF?
You can leverage Laravel's templating engine (Blade or similar) to create the initial PDF with fillable form fields pre-populated with your data. Then, use Browsershot to render that HTML template as the PDF.
Kept on getting node errors.
How to handl two lac PDF's generate in laravel 10
Use queues
thank you very much for this tutorial... Please show us your vscode configuration (extensions you are using)
Sure, I am recording videos on VSCode settings and extensions. I will start uploading soon.
Thanks you 🙏🙏
Is this project dockerized?
No, it is not dockerized
@@QiroLab Thank you, I need the dockerized repo of this stack. Let me know if you have any link.
Does it support UTF-8 Characters?
yes, it does
is it support bangla font?
Yes, you can use any font
In prod envarioment, doesn't work... In local machine yes. Works great
What error you are getting in prod environment
Did you do this on Windows or MacOS?
I implemented this on Ubuntu.
It will work on Windows and MacOS as well.
@@QiroLab I tried on windows but I got errors
It should work on windows as well. What errors you get?
@@QiroLab The command ""C:\Program Files
odejs
ode.exe" "D:\Training\Laravel\laravel-pdf-tutorial-using-spatie-browsershot\vendor\spatie\browsershot\src/../bin/browser.cjs
People that are using this within windows will run into erros. And it seems it is not compatible for windows. Currently Mac and Ubuntu users can use this package without problems.
I am not a Windows user, But I think it should work on Windows as well. For that, you need to figure out the node and npm path.
@@QiroLab Bro it doesnt why dont you take it from someone who has tried
'Promo SM'