Comments (9)
Can you please write down the error message?
from triangle-pos.
no error is showing but PDF error in popup Failed to load PDF document.
from triangle-pos.
Simply replace this code inside of [ROOT_document]\triangle-pos-master\Modules\Sale\Routes\web.php
Route::get('/sales/pos/pdf/{id}', function ($id) {
$sale = \Modules\Sale\Entities\Sale::findOrFail($id);
// $pdf = \PDF::loadView('sale::print-pos', [
// 'sale' => $sale,
// ])->setPaper('a7')
// ->setOption('margin-top', 8)
// ->setOption('margin-bottom', 8)
// ->setOption('margin-left', 5)
// ->setOption('margin-right', 5);
//
// return $pdf->stream('sale-'. $sale->reference .'.pdf');
$html=view('sale::print-pos',['sale'=>$sale]);
$mpdf = new \Mpdf\Mpdf(['format' => [80, 150]]);
$mpdf->WriteHTML($html);
$mpdf->Output();
})->name('sales.pos.pdf');
from triangle-pos.
It's using Laravel Snappy for pdf. Not Mpdf. But yes you can use it.
from triangle-pos.
thank you!!
from triangle-pos.
from triangle-pos.
Yes I used it
from triangle-pos.
Illuminate\Contracts\Container\BindingResolutionException
Target class [CommandMakeCommand] does not exist.
on composer install
from triangle-pos.
PDF Generator in this project is Laravel Snappy.
from triangle-pos.
Related Issues (20)
- Error with pdf loading HOT 1
- Simply replace this code inside of [ROOT_document]\triangle-pos-master\Modules\Sale\Routes\web.php HOT 1
- Inaccurate profit calculation when I enter more than one unit of product during checkout through pos
- Fresh installation getting error HOT 2
- How to rank user based on how they accumulated revenue
- not editable net price HOT 2
- Update Profile Error
- How to upload into hosting? HOT 1
- Purchase Business Process (Wrong) HOT 12
- setting
- Profile image isn't updated HOT 4
- Class "RealRashid\SweetAlert\SweetAlertServiceProvider" not found HOT 1
- Inventory Summary HOT 4
- Print Barcode Download PDF Shows Error HOT 3
- Purchase HOT 1
- Improved README
- @import '@coreui/coreui/scss/coreui'; error HOT 2
- Optional Product Expiry date option and product expire notification
- Support Multilang i18n HOT 1
- Let me know if you want me to add docker support for your project. HOT 1
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 triangle-pos.