DOMPDFModule
DOMPDFModule copied to clipboard
Can't include project images or css
I ca't find the way to include site images and css in my pdf
On my controller:
$pdf = new PdfModel();
$pdf->setOption('filename', 'myfile.pdf');
$pdf->setOption('terminal',true);
$pdf->setOption('paperSize', 'a4');
$pdf->setTemplate('my/model/view.phtml');
$pdf->setVariables(array(
'foo' => $bar,
));
return $pdf;
On my View:
<head>
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/font-awesome.min.css">
</head>
<body>
<div class="hero">
<h3>My pdf file</h3>
<img src="/img/logo.png" alt="My Logo">
</div>
</body>
but no image or any css style is displayed.... What I am doing wrong? Please give me a hint. Thanks!