Sto provando a convertire la mia pagina html in formato pdf usando mpdf. problema è che io sono in grado di applicare più di un css per pdf di file .. Ecco il mio codice di PHPcome aggiungere più file css in mpdf
<?php
$html =file_get_contents('mpdf/test.html');
include("../mpdf.php");
$mpdf=new mPDF();
$mpdf->SetDisplayMode('fullpage','two');
// LOAD a stylesheet 1
$stylesheet = file_get_contents('assets/css/main.css');
$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text
// LOAD a stylesheet 2
$stylesheetextra = file_get_contents('assets/css/test.css');
$mpdf->WriteHTML($stylesheetextra ,1); // The parameter 1 tells that this is css/style only and no body/html/text
$mpdf->WriteHTML($html,2);
$mpdf->Output();
exit;
?>
uscita dà non arriva con test.css. main.css si sta applicando correttamente al file pdf ma test.css non si applica.per favore aiutarmi? ringraziandoti in anticipo
fa aggiungendo il secondo foglio di stile per la prima opera cioè $ stylesheet = file_get_contents ('assets/css/main.css'). file_get_contents ('assets/css/test.css'); $ Mpdf-> WriteHTML ($ foglio di stile, 1); – jeff