I am rendering some html pages in dompdf. But It doesn't seem to be able to include my images or external css files. If I simply print the page to the screen everything works fine. But dompdf can't find them.
I found a function called: setBasePath
where the documentation states "Sets the base path used for external stylesheets and images." Sound like what I want but what is this base path relative too? I tried entering relative to root but it still doesn't find anything.
$dompdf = new Dompdf();
$dompdf->loadHtml($template);
$dompdf->setBasePath(realpath('./'));
$dompdf->render();
$dompdf->stream('note');