'css, sql, data and php cannot read by dompdf

the PHP file is well organized but when I convert it into pdf format the data and style do not read by DOMPDF. This is the code to generate the 'user-scholastic-view.php' into pdf format

$dompdf = new Dompdf();
$html = file_get_contents('user-scholastic-view.php');
$dompdf->loadhtml($html);
$dompdf -> setPaper('A4', 'Portrait');
$dompdf -> render();


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source