Why the pdf appears without the certificate content?

Posted 5 months ago by adamjhn

This code is used to get the content stored in the column "content" of the certificates table in a pdf file.

The issue is that the pdf is blank instead of have the content of the certificate.

Do you know why?



 $certificateContent = RegistrationType::with('certificate')->where('id', $request->send_to)->first();
        $pdf = app()->make('dompdf.wrapper');

        $pdf->loadHTML($certificateContent->content);
        

        return $pdf->download('invoice.pdf');

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.