i am submitting a search form and based on the posted values results are fetched from DB and shown on the result page. I want to download these results in a PDF file. I configured Dompdf and its downloading PDF with some test data as below :
public function Genderate_PDF()
{
$data = ['title' => 'some title'];
$pdf = PDF::loadView('pdf', $data);
return $pdf->download('mypdf.pdf');
}
but in my scenario instead of loading the pdf view I have to show results in a page and then export that page results to PDF on a button click( Export PDF). Can someone please guide me how can i achieve that
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire