PDF on the fly
Render any HTML to a real, downloadable PDF on the server.
Read the docs →.phlo
// render any HTML to a downloadable PDF on the server
route GET invoice $id {
$pdf = %PDF
$pdf->filename = 'invoice-'.$id.'.pdf'
$pdf->title = 'Invoice '.$id
return $pdf->fromHTML($this->invoiceHtml($id))
}
PhloINVOICE #1042
Pro plan€12.00
Extra seats€8.00
Total€20.00
The server turns this into a real, downloadable PDF with the Mpdf package.
