Comments (9)
Please add the below line in config/app.php
to resolve the PDF facade.
'PDF' => Praem90\PDF\Facade::class,
from laravel-mpdf.
I am using Laravel 5, and I included it in bootstrap/app.php file.
$app->register(Praem90\PDF\ServiceProvider::class);
$app->withFacades(true, [Praem90\PDF\Facade::class => 'PDF']);
from laravel-mpdf.
Hope you are working in laravel version > 5.1
Updating the bootstrap/app.php
file isn't a good practice and not recommended too. Please follow the recommended way and it should work fine.
https://laravel.com/docs/5.0/facades#creating-facades
https://laravel.com/docs/5.0/providers#registering-providers
from laravel-mpdf.
I am using Laravel/lumen framework, I cannot see app.php file in config folder.
from laravel-mpdf.
I've tested this package with Lumen 5.5 and its working fine.
Check this out.
https://github.com/praem90/test-mpdf-with-lumen
from laravel-mpdf.
Just clone the repo and install dependencies.
Run the following command in the root directory,
php -S localhost:9000 -t public
Visit localhost:9000 and you can view the test PDF
from laravel-mpdf.
Hi,
I am facing another prob. If I try to loadHTML, it does take too much time.
$html = '
Client Phone Number
'.'PHONE_NUMBER'.'
Client Email
'.'Email'.'
Pet Name
'.'Pet option_details'.'
Ask.Vet Text Session Date/Time
'.'concludeTime'.'
'.'CLINIC_NAME'.' Location
'.'CLINIC_LOCATION'.'
';
$mpdf = PDF::loadHtml($html);
$mpdf->Output(\URL::to('').'/thread_pdfs/pdf.pdf');
from laravel-mpdf.
You should provide system path (storage_path('thread_pdfs/pdf.pdf')
) but URL::to()
provides url (http://localhost
).
from laravel-mpdf.
It still takes time.
from laravel-mpdf.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-mpdf.