Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

barryvdh laravel dompdf rendering just two pages

I am using barryvdh laravel dompdf for rendering pdf from html view in laravel 5.7. It was working fine but when the view exceeds to more than 2 pages it cuts the page and does not print the third page. However if i copy all the page data and paste it somewhere else the who content is pasted which means the content is there somehow but not showing.

This issue was also mentioned in the github repository but was not answered by anyone.

I am using Laravel 5.7

This is code :

    $pdf = PDF::loadview('emails.send-email.case-email-pdf', compact('pdf_data'));


    $file_name = 'case-email-'.$data['case_id'].str_random(10).time().'.pdf';

    Storage::put($config['folder'].'/'.$file_name,$pdf->output());
like image 744
Syed Abdur Rehman Kazmi Avatar asked Apr 18 '19 10:04

Syed Abdur Rehman Kazmi


1 Answers

The solution was to NOT USE table tag. Use divs instead.

like image 162
Syed Abdur Rehman Kazmi Avatar answered Nov 01 '22 20:11

Syed Abdur Rehman Kazmi