laravel-pdf icon indicating copy to clipboard operation
laravel-pdf copied to clipboard

make empty pdf

Open AfshinEfati opened this issue 4 years ago • 5 comments

hi i use it . When I put a text directly in the view. The output of the pdf file is correct But when I send data and get output from the data. The pdf file is stored as blank pages

controller :

$res = Order ::with('tour') -> with('passenger') -> with('agancy') -> find($id);

`    $pdf = PDF::loadView('pdf.document',['res'=>$res]);
    return $pdf->download('invoice.pdf');`

AfshinEfati avatar Jul 13 '20 12:07 AfshinEfati

@AfshinEfati how your pdf.document looks like? see if you put {{ $res->id }} in the pdf.document its show correct output

od3n avatar Jul 23 '20 04:07 od3n

@od3n Hi, I have the same problem. can I have full code in controller and view to loop datatable please

rethdaro avatar Jul 24 '20 04:07 rethdaro

Hey Afshin, Please provide your full view template codes so we can check it better.

erfansahaf avatar Jul 27 '20 22:07 erfansahaf

Hi, I have the same problem. Is there a solution to this?

vicnjagi avatar Aug 24 '20 21:08 vicnjagi

Hi, I have similar problem. Mine is not rendering the PDF. It is just loading and timeout. How can I solve this

devsahm avatar Nov 24 '20 07:11 devsahm