有没有办法让dompdf看到一个CSS文件来设置PDF输出的样式?或者是否必须与style="border:...;"
等样式属性内联?
这是我试过的:
require_once("pdf/dompdf_config.inc.php");
$html = ob_get_contents();
//ob_clean();
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->set_base_path(realpath(dirname(__FILE__)));
$dompdf->render();
$content = $dompdf->output();
$fileatt = "generated_pdfs/mypdfss.pdf";
file_put_contents($fileatt, $content);