I need to create a PDF-style coupon to send to a non-fiscal Daruma DR800 printer.
I need to know how to generate a custom size PDF and its contents. I already do PDF generation 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();
}