1
I got the following code:
$estiloSite = file_get_contents('http://localhost/wesleyanagceu.com.br/_scripts/_css/style.css');
$estiloAdmin = file_get_contents('http://localhost/wesleyanagceu.com.br/_scripts/_css/admin.css');
require_once "_classes/_util/_PDF/PDF.php";
$html = $_POST["htmlPDF"];
$pdf = new PDF;
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->WriteHTML( $estiloSite, "_classes/_util/_PDF::HEADER_CSS");
$pdf->WriteHTML( $estiloAdmin, "_classes/_util/_PDF::HEADER_CSS");
$pdf->WriteHTML( utf8_decode ( $html ) );
$pdf->Output("relatorio.pdf","D");
I’m not finding it in the documentation of FPDF how is it done that in mPDF that’s how:
$stylesheet = file_get_contents('style.css');
$mpdf->WriteHTML($stylesheet,\Mpdf\HTMLParserMode::HEADER_CSS);
The way above works on mPFD.
How would it be in the FPDF knowing that it served as groundwork for creating of mPF?
The FPDF are only 2 files, already mPDF... That’s why I’m giving preference to PPDF. But if there is no other way...
– Carlos Rocha