0
I need to create a coupon style PDF, to send to a Daruma DR800 non-fiscal printer.
I need to know how to generate a custom sized PDF and its contents. I already generate PDF with DOMPDF in Laravel 5.5.
Example of how to generate any PDF:
public function printSimple($id)
{
$sale = $this->sale::where('id', $id)->with('user', 'customer', 'products', 'promissory')->get()->first();
$company = Company::find(1);
$view = view('sale.print-simple', compact('sale', 'company'));
$pdf = PDF::loadHTML($view)->setPaper('a4');
return $pdf->stream();
}
you have the code of this coupon?
– Bruno Santos