Laravel PDF Magic: From Dynamic Views to Beautiful PDFs with Spatie Browsershot

  Рет қаралды 2,613

Glenn Raya

Glenn Raya

7 күн бұрын

Source code: github.com/glennraya/browsershot
Want to create stunning, downloadable PDFs from your Laravel app's dynamic views? Look no further! This video unveils the magic of Spatie Browsershot, transforming your Laravel application into a PDF powerhouse. Learn how to generate beautiful, print-ready PDFs effortlessly, saving you time and frustration.
#laravel #pdf #SpatieBrowsershot #webdevelopment #laraveltutorial #php #DynamicViews #PDFGeneration #coding #webdeveloper

Пікірлер: 30
@mon_codes
@mon_codes Күн бұрын
thanks idol, u have my sub
@elrincondeisma
@elrincondeisma Күн бұрын
Tailwindui library? I see a beatiful dashboard.
@glennraya
@glennraya 23 сағат бұрын
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
@scherzer6428
@scherzer6428 8 сағат бұрын
@@glennraya Can you make a video about the dashboard
@glennraya
@glennraya 8 сағат бұрын
​@@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.
@ronaldngarombo1026
@ronaldngarombo1026 7 сағат бұрын
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.
@glennraya
@glennraya 7 сағат бұрын
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
@yoskokleng3658
@yoskokleng3658 2 күн бұрын
what's framework for css ? if i can think of the style of report design like u. my customer would love me 🤣😭
@glennraya
@glennraya Күн бұрын
@@yoskokleng3658 I use tailwindcss for the css framework.
@benedettosciuto6924
@benedettosciuto6924 Күн бұрын
can Laravel PDF Magic repeat header and footer on every page?
@glennraya
@glennraya Күн бұрын
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.
@yoskokleng3658
@yoskokleng3658 2 күн бұрын
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 .
@glennraya
@glennraya Күн бұрын
@@yoskokleng3658 I don't think that's possible on a web interface. Maybe some form of dirty hack would do.
@jimmyarb7767
@jimmyarb7767 5 күн бұрын
Sir Glenn i found difficulty in production there is an error in node any advice to fix it.
@glennraya
@glennraya 4 күн бұрын
What node version are you using? Puppeteer requires node version 18 and up.
@ronaldngarombo1026
@ronaldngarombo1026 7 сағат бұрын
@@glennraya I personally was using node 22 but face the error @jimmyarb7767 is probably referring to. Issue was with node and puppeteer
@wuba6977
@wuba6977 6 күн бұрын
Does it support all browsers?
@glennraya
@glennraya 5 күн бұрын
Yes, it supports all modern browsers.
@kaiserdianalan7059
@kaiserdianalan7059 5 күн бұрын
Huui nakikita kita sa programmer code posting
@glennraya
@glennraya 5 күн бұрын
FB group po pa yun? haha
@rondevPH
@rondevPH 2 күн бұрын
hard to implement on windows
@emmanuelsiziba5142
@emmanuelsiziba5142 2 күн бұрын
I agree with you
@glennraya
@glennraya Күн бұрын
@@rondevPH Really? I couldn't try it, I don't have a windows machine. 😅
@rondevPH
@rondevPH Күн бұрын
@@glennraya good for you. That is why dompdf is the only way😅
@JavierHernandez-jg3wo
@JavierHernandez-jg3wo Күн бұрын
I'm trying to get it to work with laragon on windows but I can't figure out how to get it to work.
@glennraya
@glennraya Күн бұрын
@@rondevPH hmm, can't tell for sure, Browsershot docs doesn't mention any incompatibility with Windows.
@ajmal7247
@ajmal7247 6 күн бұрын
Can you share the source code?
@glennraya
@glennraya 6 күн бұрын
Yes sure, I'll push it to github and linked on the description.
@glennraya
@glennraya 6 күн бұрын
github.com/glennraya/browsershot
@ajmal7247
@ajmal7247 6 күн бұрын
@@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.
You don't need a frontend framework
15:45
Andrew Schmelyun
Рет қаралды 107 М.
Sigma Girl Past #funny #sigma #viral
00:20
CRAZY GREAPA
Рет қаралды 25 МЛН
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 81 МЛН
I CAN’T BELIEVE I LOST 😱
00:46
Topper Guild
Рет қаралды 58 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 10 МЛН
I build a TODO list app with Laravel in 17 minutes.
17:58
Josh Cirre
Рет қаралды 3,5 М.
New Spatie PDF Package: Use Tailwind Styles in PDF
3:18
Laravel Daily
Рет қаралды 12 М.
Livewire vs. Inertia
11:05
Laravel Magazine
Рет қаралды 1,1 М.
Validating json web tokens in zig w/ openssl
2:22:52
sphaerophoria
Рет қаралды 924
How React 19 Almost Broke The Web
55:40
Theo - t3․gg
Рет қаралды 86 М.
LARACON EU 2024 // TAYLOR OTWELL :: LARAVEL UPDATE
1:10:48
Laracon EU
Рет қаралды 51 М.
You're not stupid: How to learn difficult things with Obsidian
6:16
Python Programmer
Рет қаралды 322 М.
`const` was a mistake
31:50
Theo - t3․gg
Рет қаралды 122 М.
Learn By Building: Language Server Protocol
1:59:54
TJ DeVries
Рет қаралды 63 М.
How Big Tech Ships Code to Production
0:59
ByteByteGo
Рет қаралды 275 М.
Ждёшь обновление IOS 18? #ios #ios18 #айоэс #apple #iphone #айфон
0:57
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 4,2 МЛН
Gizli Apple Watch Özelliği😱
0:14
Safak Novruz
Рет қаралды 4,3 МЛН