Skip to content

php-pdf/dompdf-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Dompdf Adapter

Latest Version Software License Total Downloads

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');

Releases

No releases published

Packages

No packages published

Languages