Closed shimulckbt closed 1 year ago
Can you please write down the error message?
no error is showing but PDF error in popup Failed to load PDF document.
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');
It's using Laravel Snappy for pdf. Not Mpdf. But yes you can use it.
thank you!!
have you used swiftmailer?
On Sat, Jan 1, 2022 at 12:15 AM Fahim Anzam Dip @.***> wrote:
It's using Laravel Snappy for pdf. Not Mpdf. But yes you can use it.
— Reply to this email directly, view it on GitHub https://github.com/FahimAnzamDip/triangle-pos/issues/8#issuecomment-1003430250, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASDCJIYKMEL62CKVBQD4NUTUTXXK3ANCNFSM5I4N2KLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
Yes I used it
Illuminate\Contracts\Container\BindingResolutionException
Target class [CommandMakeCommand] does not exist.
on composer install
PDF Generator in this project is Laravel Snappy.
pdf generator invalid in payment details, barcode pdf download does'nt work