xxxxxxxxxx
//Change laravel function return type
//if you use like this
public function getPrintView(Request $request): string
{
$pdf = PDF::loadView('finance.accessory.distribution.accessorydistributionPrint')->setPaper('a4', 'landscape');
return $pdf->stream('invoice.pdf');
}
//that is not working, look you return function stype is string
//you should remove string, like this
public function getPrintView(Request $request)
{
$pdf = PDF::loadView('finance.accessory.distribution.accessorydistributionPrint')->setPaper('a4', 'landscape');
return $pdf->stream('invoice.pdf');
}