I have a textarea
with an editor to send data with formats such as in bold, bullets, etc. and when I show that data in a pdf it shows them as follows:
<p><b>LUGAR: </b>En estudio</p><p><b>CAPELLÁN:</b> En estudio</p><p>OBJETIVO DE
You do not show them to me with the format. I am using dompdf
, laravel
and angular
.
So I make the call to dompdf
:
public function crearPDF($datos, $actividades, $vistaurl, $tipo){
$data = $datos;
$actividades = $actividades;
$date = date('Y-m-d');
$view = \View::make($vistaurl, compact('data', 'actividades', 'date'))->render();
$pdf = \App::make('dompdf.wrapper');
$pdf->loadHTML($view);
if($tipo==1){
return $pdf->stream('reporte.pdf');
}
if($tipo==2){
return $pdf->download('reporte.pdf');
}
}