Work in progress
This package aims to provide a common interface for PDF generation, based on plain HTML. It can return a PSR-7 Response object to download/show the pdf, or save it to a path.
$factory = new \Pdf\Adapter\DompdfFactory();
$factory->setDefaultOptions(['paper' => 'a4']);
$pdf = $factory->html('<h1>Hello world!</h1>', ['orientation' => 'landscape']);
$output = $pdf->output();
$response = $pdf->inline('invoice.pdf');
$response = $pdf->attachment('somefile.pdf');
$pdf->save('/some/path/file.pdf');