i have an html editor an saved the html content on my DB, on the editor i add some plugins to add php variables to be filled when the PDF renders but i only get the HTML with the variables names
i tried using html_entity_decode on the view and using a second view to render the HTML on my DB and then asign the result on my PDF and i have the same result
this is where i get the html string
$contrato = DB::collection('contrato')->where("_id",$request->contratoId)->first();
$pdfContent = html_entity_decode($contrato["cuerpo"]);
$pdfBody = view('pdf.body')->with('pdfContent', $pdfContent)->render();
$pdf = PDF::loadView('pdf.default',$data);
$pdf->setPaper('a4', 'letter');
and as the result i only get an html rendered but with the variables names and no its values
Lorem ipsum dolor sit amet {!! $fechaCompleta !!}.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire